Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to run PHP file

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)

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

  • 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>

The result was:

enter image description here

>Solution :

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%20program/program.php
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading