Posted by:
kmg
(---.dhcp.rsbg.or.charter.com)
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>