- 2

Why is my php not working?

I followed all the instructions to get php to work and wrote a basic "Hello World" program. This is what's written in the file: <?php echo "Hello World"; ?> And this is what appears when I open it with chrome: <?php echo "Hello World"; ?> I think it's pretty clear why I don't think this is working... Please help me! EDIT So I decided to try and uninstall xampp and instead use wampserver and that seems to have worked.

6th Dec 2016, 10:33 PM
Yang Cabrera
Yang Cabrera - avatar
2 odpowiedzi
0
Always remember the extension of php, should be in .php like index.php, home.php. You are using . html extension that's why it's happening. Note: if you are running php you need a localhost server use xamp or wamp and start apache.
6th Dec 2016, 2:57 AM
Shan Asif
Shan Asif - avatar
- 1
I have restarted apache nd even tried reinstalling xampp and still nothing works. Also no, I have not been using the .html extension, I used .php
6th Dec 2016, 10:20 PM
Yang Cabrera
Yang Cabrera - avatar