using local host plus file name getting error url not found
Posted by: kmg (---.dhcp.rsbg.or.charter.com)
Date: August 28, 2013 04:57PM

New to using wampserver. Watched a lot of videos on it on youtube. Still having an issue. If anyone can help it would be greatly appreciated.

Wamp is green on my desktop but my code url is not getting found. Here are the steps I followed. Thank you for helping.

Entered the code into Notepad++
Clicked File, Save As,
Went to Wamp and to www folder on my computer on the C drive
Named the file ch2assignment, wrote it inside double quotes per instructions so it was "ch2assignment.php" and clicked the down arrow for save as type and chose PHP Hyupertext preprocessor file
Clicked Save
Opened my Firefox browser and typed [localhost] and hit enter
Got the message Not Found, Requested URL/ch2assignment.php not found on this server
Checked the wampserver in my tray and it is green so it is working

I just used the length and width code for the square as my code as part of an assignment for online school.

Here it is:

<html>
<body>
<h1> Chapter 2 Assignment </h1>
<?php
$length = 20;
$width = 20;
$area = $length * $width;
echo "The length equals $length <br>\n";
echo "The width equals $width <br>\n";
echo "The area of the square equals $area<br>\n";
?>
</body>
</html>

Options: ReplyQuote
Re: using local host plus file name getting error url not found
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 28, 2013 05:06PM

Please check the c:\wamp\www folder to see what is actually in there.

Make sure that Explorer is showing all file extensions.

My guess is it was either saved somewhere else or it got saved without the .php extension or it has had a .txt extension added i.e. ch2assignment.php.txt

Options: ReplyQuote
Re: using local host plus file name getting error url not found
Posted by: kmg (---.dhcp.rsbg.or.charter.com)
Date: August 28, 2013 05:44PM

Thank you for helping.

I checked and it's in the www folder and has the extension .php. I had checked to show all file extensions. I'm new to wampserver.

The wamp icon is green. I click it, then click local host. Then I put the file name after local host so it looks like localhost/ch2assignment.php. Then I get the message url not found.

Puzzling. Is someone can help it would be much appreciated. Thanks

Options: ReplyQuote
Re: using local host plus file name getting error url not found
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 28, 2013 05:53PM

Please just run 'localhost' . Do you see the WAMPServer home page?

Options: ReplyQuote
Re: using local host plus file name getting error url not found
Posted by: kmg (---.dhcp.rsbg.or.charter.com)
Date: August 28, 2013 06:14PM

Not sure what I did but I got it working now. Thank you all for your help.

Options: ReplyQuote
Re: using local host plus file name getting error url not found
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 28, 2013 06:16PM

Probably spelt it corectly.

Options: ReplyQuote


Sorry, only registered users may post in this forum.