Trying out PHP for the 1st time and trying to run a basic PHP program.
The steps I followed:
- Installed XAMPP and running Apache server on port 8080. (It says
running on 443 and 8080)
- Then I go to C:\xampp\htdocs and create a folder named php program and inside I create file named program.php. The code:
<html>
<head></head>
<body>
<?php
echo "yeet";
?>
</body>
</html>
- Then I put the following in the browser with the Apache server running: http://localhost/php program/program.php
The result was:
CodePudding user response:
The default port for http
is port 80
, but you said Apache was running on port 8080
. You need to be explicit in your URL when you are using a non-default port.
http://localhost:8080/php program/program.php