Why won't my PHP parse correctly?

118 Views Asked by At

I know the title is vague, but the details for this particular question would make the title absurd.

I have an index.php file that has a virtual include within it:

<!--#include virtual="/includes/header.include"-->

This header.include file is HTML and I want to add a few lines of PHP inside of it.

My .htaccess file is set up to process .include files as php. The actual line from the .htaccess file is:

AddType application/x-httpd-php .include

The PHP that I'm trying to add is:

<?php echo "test <br />"; ?>

But when I load the website, the only thing that prints is:

"; ?>

If I view the source of the index.php I can see the entire PHP code that I have above.

Some other things I've already tried:

What am I doing wrong? Why won't the PHP get parsed correctly?

My PHP version is 5.1.6

0

There are 0 best solutions below