Click to See Complete Forum and Search --> : php code in html page


poongothai
07-21-2003, 07:05 AM
sir,
i wote conter programme code it is working only .php programmes it won't work.html files it will work or not what can i do???
my wesite add is www.tnmmu.ac.in
here go to results when i enter rollno it is going to medical.php3 there that counter is working but i want to put
it in index.html page

pyro
07-21-2003, 07:30 AM
PHP generally only works on pages with a .php extention. This saves the server from having to run every page through the PHP parser. You'll have to rename you page with a .php extention or add a .htaccess file that looks something like this:

AddType application/x-httpd-php .php .htm .html

That will tell the server to use .htm and .html files as .php file...

brendandonhue
07-21-2003, 03:37 PM
htaccess only works on Apache servers. If your server is running apache, try Pyro's code. If that doesn't work, try this

AddHandler application/x-httpd-php .php .htm .html

On other servers, do whatever you need to set the file association of .htm and .html files to php.exe