You are here
Tom Sterns - Mon, 2013/01/07 - 22:15
I would like to configure apache to execute php scripts w/in .html documents.
i.e. this text in a file named phptest.hrml:
<html>
<head>
<title>PHP in HTML Test</title>
</head>
<body>
<ul>
<?php for($i=1;$i<=5;$i++){ ?>
<li>Menu Item #<?php echo $i; ?></li><?php } ?>
</ul>
</body>
</html>
Have tried multiple variations of .htaccess with no luck.
Seems like this sould be pretty straight forward.
Forum:
Ummm, why not just rename the file?
If you rename the file phptest.php the html will still work fine and so will the php. Should then just work OOTB - no apache config required...
Add new comment