Greetings,
I was hoping a fellow forum member could help me out.
I came across a forum post (forgot to bookmark)showing a piece of code that could be inserted into my htaccess file, which would allow a php include tag(s) to be displayed on a file saved as .html.
Ex:
<?php
include ("filename.php");
?>
Thanks in advance,
Hostresponse
Please Help- PHP Shown on HTML page
Moderator: General Moderators
-
hostresponse
- Forum Newbie
- Posts: 1
- Joined: Fri Jul 29, 2005 10:57 pm
you could always use htmlentities
or, when writing your html, convert the special characters yourself
Code: Select all
$string = htmlentities("<? this is php");
echo $string;Code: Select all
&amp;lt;? this is php ?&amp;gt;- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I think he's referring to running .html files as PHPI believe.. refer to the "install.txt" file that comes with a php download for specifics.
Code: Select all
AddType application/x-php .php .html