This question already has an answer here:
I have asked a question leading up to this earlier. Thanks again for your help.
I have updated my .htaccess file in my root directory with the following:
AddType application/x-httpd-php .html
Where within my .html page should I place the php tag?,
I still cannot seem to get my .html page to load the .php script.
</div>
If you have followed this guide correctly, then according to the article, you should be able to execute php by simply opening a php tag.
From the article:
Things to watch out for:
- If you have an existing .htaccess file, add this to it, do not overwrite it or other >settings may stop working! Always be very careful with your .htaccess file and ask your >host if you need help
- Anything in your .html files that starts with your file for some other reason (an XML tag for example) you will need to echo these lines >to prevent errors. For example:
<?php echo '<?xml version="1.0" encoding="IUTF-8"?>'; ?>
Where within my .html page should I place the php tag?
The answer is you can place your php content anywhere in your html page as long as it is inside <?php ?>
tag.
even if you have done correct modification to .htaccess
file and still your php content is not getting parsed than check whether you are connected to server or not.