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%20program/program.php
The result was:
My Answer:
php
echo "Hello, World!";
?>
__Then I open my browser and type in the URL: http://localhost:8080/php_program/program.php__But instead of seeing the output "Hello, World!", I see the actual code of the PHP file. What am I doing wrong?__Any help would be appreciated. Thank you.
Rate this post
4 of 5 based on 1559 votesComments