I need some assistance using a PHP include in HTML, works fine as PHP but doesn't as HTML. What I'm trying to insert is this: <?php include "image.php"; ?> On my PHP test version, it works just fine, but on my HTML test version it doesn't ... the only difference is the file extension ".php" vs ".html" -- the coding is identical. http://www.swmidirectory.org/index2.html http://www.swmidirectory.org/index2.php All this is intended to do is display a random image underneath "Welcome to the Award Winning Southwest Michigan Business & Tourism Directory". My goal is to avoid using Javascripts to accomplish the loading of random images. Thanks in advance.
Is the web server set up to process .html as a php file? If not then of course it will not work. If it is apache you can create a .htaccess file to tell apache to process the .html file as a php file. From: http://forums.digitalpoint.com/showthread.php?p=186832#post186832
I know you can add that in cPanel. I do not know Plesk and DA as well, but I imagine you can do it in them as well.