Lineman Posted April 3, 2008 Share Posted April 3, 2008 Have just installed PHP5 on my computer which runs a Linux OS. Now i want to start learning. I have just made a simple HTML page with: <?php print "Hello World! <br>"; print "Hello World!"; ?> Would someone like to explain how and where i might save the HTML file and how to recall it so that i can view the contents. Thanks Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 3, 2008 Share Posted April 3, 2008 have you installed apache? mysql? have you configured these to work in harmony like ebony and ivory?..... Quote Link to comment Share on other sites More sharing options...
trq Posted April 3, 2008 Share Posted April 3, 2008 You need to save it with the php extension within your apache document root. You should be able to find this by issuing... grep ServerRoot /etc/apache2/httpd.conf Either that or locate the httpd.conf file manually. Some distros put things in different locations. What distro are you using? From there, you simply need to call http://localhost/scriptname.php from your browser. Quote Link to comment Share on other sites More sharing options...
Lineman Posted April 3, 2008 Author Share Posted April 3, 2008 I have installed via a terminal: 1) apache2, 2) php5, 3) mysql-server, 4) php5-mysql. I am running Ubuntu "Gutsy Gibbon 7.10". After installing the above i typed: http://localhost into the Web browser's address bar and saw a page with, apache2-default on it. I did manage to navigate to where the apache2-default folder is located and when i opened it clicked on an html file called index.html and was rewarded with the text "It works"? Have saved an html page with an .php extension but i can't work out how to place it in the apache2-default folder. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.