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:
- Copy the
.htaccess
file into the directory that theheader.include
file is in - Both the accepted answer and the answer with 6 upvotes from this question
- Tried
<br>
instead of<br />
What am I doing wrong? Why won't the PHP
get parsed correctly?
My PHP
version is 5.1.6