Howdy_McGee Posted September 1, 2010 Share Posted September 1, 2010 I just downloaded the WAMP server to use PHP without actually having a server. The question is how do I open files through the localhost? I can get to the WAMP welcome page through local host but I don't know how to run my PHP files on it. Any advice? Link to comment Share on other sites More sharing options...
niche Posted September 1, 2010 Share Posted September 1, 2010 use your browser and http://localhost/yourfilenameandextensionhere as the URL Link to comment Share on other sites More sharing options...
Howdy_McGee Posted September 1, 2010 Author Share Posted September 1, 2010 That's what I thought, but I have a folder on my Desktop with a bunch of PHP files in it. No matter how I try though it keeps telling me "Page cannot be found".I tried "localhost/name.php"and I tried the folder it's in "localhost/web/name.php" Both lead to a page not found, I don't understand it... Comes up with a 404 Error. I made sure WAMP is online and all services are started... Link to comment Share on other sites More sharing options...
Synook Posted September 1, 2010 Share Posted September 1, 2010 You can't just put files anywhere and hope that the server will find them - you have to locate them in, or under, the document root of your web server - usually C:\www\ for WAMP. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 1, 2010 Share Posted September 1, 2010 you should have a directory wamp, within that, you have www folder, this is where you add folders and files.www/myphp.php = http://localhost/myphp.phpwww/mywebfoler/myphp.php = http://localhost/mywebfoler/myphp.php Link to comment Share on other sites More sharing options...
Howdy_McGee Posted September 1, 2010 Author Share Posted September 1, 2010 That works! Man i've been trying to figure this out for a couple days now messing around in the files. Thanks again!!! Link to comment Share on other sites More sharing options...
niche Posted September 1, 2010 Share Posted September 1, 2010 If you want (or need) to use a directory other than the www directory in your wamp folder click the wamp server icon in your tray, then click apache, then click "alias directories". You'll be able to figure it out from there. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.