Hi,
Is it possible for me to use php scripts in a file with a .html extension? What I want to do is add <?php require "cgi-bin/counter.php"; ?> in the head section of the html file and then use this later in the html file : <?php counter(); ?> . But this doesn't work. Is it even possible for me to do this or am I just doing something wrong?
Thanks, Adam
Well the server needs to know to parse the file via PHP. So you simply set the server to pass .html files to the PHP interputer who will look for the <? ?> tags and run what is in between
Ah, thanks very much.
So, if I wanted to run a script when the HTML page loaded, say, counter.php, is there any way I can do that with straight HTML?
Depending on how your counter.php script works, try <img src=counter.php>, that might work