Lee Posted September 20, 2006 Share Posted September 20, 2006 Hi everyone I'm also brand new to php :-\I have just installed WAMP5, used localhost during install, & localhost is showing all the right info.I'm learning from the 'php for dummies' book & made a php file with the following code..[code]<html><head><title>PHP Test</title></head><body><p>This is an HTML line<?phpecho “<p>This is a PHP line</p>”;phpinfo();?></body></html>[/code]I know this is info is already available from localhost, but where would I store this file to make it work?Thanks. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 20, 2006 Share Posted September 20, 2006 Look for the WAMP installation directry which I think is located in the root of the hard drive - C:\WAMP - look for a folder called [b]htdocs[/b] or [b]www[/b] within the WAMP folder. You put all your php files in the htdocs or www folder. You can then access these php files by going to http://localhost/filename.php Quote Link to comment Share on other sites More sharing options...
Lee Posted September 20, 2006 Author Share Posted September 20, 2006 aahh I see, I was just going to the www directory & opening the file. I didn't realise I would need to use http://localhost/ in the browser.I assume I will do this with every file I create now then..Thanks mate!! ;D Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 20, 2006 Share Posted September 20, 2006 Yeah that is correct. PHP runs on the server, thus you had to instal WAMP. You cannot run php files like you can when you double click a html files and it opens up in IE. PHP is not a lanaguage the browser understands, as PHP is a web programming langauge. HTML, CSS and javascript are client side lanagugaes which the browser understands. PHP generates the output which will be mainly text/HTML from your code. Quote Link to comment Share on other sites More sharing options...
Lee Posted September 20, 2006 Author Share Posted September 20, 2006 [quote author=wildteen88 link=topic=108798.msg438059#msg438059 date=1158766677]Yeah that is correct. PHP runs on the server, thus you had to instal WAMP. You cannot run php files like you can when you double click a html files and it opens up in IE. PHP is not a lanaguage the browser understands, as PHP is a web programming langauge. HTML, CSS and javascript are client side lanagugaes which the browser understands. PHP generates the output which will be mainly text/HTML from your code.[/quote]Aha, thats another penny that has now just dropped! Thanks again ;D 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.