Results 1 to 3 of 3
Hi,
iam having Linux , i want to write a simple program and i want to run that program......
Is there any software is required ?
then after installation.......... how ...
- 05-14-2007 #1Linux Newbie
- Join Date
- Oct 2006
- Posts
- 107
php
Hi,
iam having Linux , i want to write a simple program and i want to run that program......
Is there any software is required ?
then after installation.......... how to the execute the program........
Thanks in Advance
- 05-14-2007 #2
You can run PHP from the command line if you wish:
PHP: Using PHP from the command line - Manual
If you look on the rest of the site you will find all the information for installation as well.
- 05-14-2007 #3
To give you a slightly more concise answer:
You will need to install PHP. How you will do this depends on your distro, but if you open your package manager (Synaptic on Ubuntu, YaST on SuSE, etc.) and search for 'php', you should find it. Install.
If you want to display your PHP page in a web browser, you will need to have an HTTP server somewhere. If you have a website, you can host the PHP page there; otherwise you need to install an HTTP server on your system as well. Search for 'apache' in your package manager and install it. You can now start Apache, write a PHP script, put it in /var/www/localhost/htdocs, and point your webbrowser to http://localhost/foo.php.
If you just want to run a PHP script, you don't need Apache at all. You can just write your script, then on the commandline, run: "php foo.php".
Got it?DISTRO=Arch
Registered Linux User #388732


Reply With Quote