Php not working?

The host isn’t executing the php script?

I am using Kompozer but that shouldn’t effect this issue.

I noticed that my index.php wasn’t including my header.php. So I decided to try a dummy script (hello world) and the site doesn’t run the script… just displays the code… why is this happening?

I checked the file on your account and, like the output on the page you linked to, the file contains this where the PHP code should be.

&lt;?php <br style="">Print "Hello, World!";<br style="">?&gt;<br style="">&lt;?php <br style="">Echo "Hello, World!";<br style="">?&gt;

As you can see, all the PHP tags are escaped, and there are HTML tags within it everywhere, which are clear signs of a visual website editor prevent raw code editing.

You cay Kompozer shouldn’t affect this issue, but the Wikipedia page says Kompozer is “an open source WYSIWYG HTML editor”. And it makes perfect sense for a “What You See Is What You Get” editor to show you PHP code in your editor and show the same PHP code, unparsed, on your website.

If you would like to get into PHP coding, that’s great! But please don’t use a (discontinued) visual editor to build that. I can assure you that using a real code editor like Visual Studio Code or phpStorm works much better for that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.