Write Your First PHP Programme in Linux
Write Some Programme is PHP is Very Easy.
First You Must Start PHP and Apache Servers
Take one terminal and login as root user by typing su -
then start your apache server by typing service httpd start
goto directory /var/www/html by typing cd /var/www/html
craete a directory with any name say firstphp by typing mkdir firstphp
then goto that dircetory by typing cd firstphp
create one file index.php here using any text editor (vi editor can be used)
type vi index.php in the command prompt
then press the key 'i'
now type the following
<?php
echo "This is my first php programme";
?>
now press 'Esc' key and then type ':x'
now a file named index.php is created in your /var/www/html/firstphp/ directory
now open any browser say firefox
now type localhost/firstphp at the address bar
WOW.. You Can Find Your Programme There.....
Comments
i dont know anything about linux axcept to use it like windows. eg. open, close, cut, paste etc. open office too is same.
i am working in kseb. we are changing our software to linux based oruma.
i would like to learn more about linux, including networking, mysql etc
what to do
thanks for coming to my blog
thiruvallabhan
for learn networking and mysql you must go for a linux cource or use internet.
I konw something about Oruma in KSEB. Its a good approach. Congratulations for the decision.
if you have a linux system and internet connection you can easily entered into the world of open source software's.
thanks..
Php Web Development Company Bangalore | Ecommerce Website Designer In India | Internet Marketing Company in Bangalore | Ecommerce Website Company In Bangalore