Jump to content

Apache not parsing HTML files for PHP


Genome314

Recommended Posts

I'm a PHP beginner so I'm not sure if the title is completely correct so I'll explain the symptoms.

 

I have PHP in my html file, but instead of the echo correctly outputting only the html code, it outputs the full:

 

echo '<a href="logout.php" title="Logout">Logout</a><br/>

<a href="change_password.php" title="Change your password">Change password</a><br>';

including the ';

 

In my httpd-xampp.conf I have the following which I THINK needs to be changed?? According to this topic: http://forums.phpfreaks.com/topic/295131-trouble-in-getting-php-to-parse-html-files/

 

 

<FilesMatch "\.php$">

    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

 

I think my problem is the same but my filesmatch has quotes, I've tried getting rid of them and entering what was entered in that topic but it doesn't work.

 

Any help would be greatly appreciated, again, sorry for the question - I started php a few days ago...

Link to comment
https://forums.phpfreaks.com/topic/297176-apache-not-parsing-html-files-for-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.