Tom Sterns's picture

I would like to configure apache to execute php scripts w/in .html documents.

i.e. this text in a file named phptest.hrml:


        <title>PHP in HTML Test</title>
            <?php for($i=1;$i<=5;$i++){ ?>
            <li>Menu Item #<?php echo $i; ?></li><?php } ?>

Have tried multiple variations of .htaccess with no luck.

Seems like this sould be pretty straight forward.

Jeremy Davis's picture

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