I am trying to put some php code into an html page. I've placed in my root directory a .htaccess file and added the php/.htm .html line. I have a simple php echo hello world in there that does not work. The wanted code is four php lines trying to put out the info in SESSIONS onto the page. Does godaddy support php in html? Lostlee
<?php echo "hello";?>
Zipcode : <?php echo $_SESSION['zip'];?> <br>
State : <?php echo $_SESSION['st'];?> <br>
District : <?php echo $_SESSION['dist'];?><br>
Email : <?php echo $_SESSION['email'];?><br
This is the code including the hello world test.
Same issue here. Tried adding many different combinations of stuff into the .htaccess file. inluding but definitely not limited to:
Options +ExecCGI AddHandler fcgid-script .html
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html
Honestly, at this point I'm just going with a different hosting company. It shouldn't be this hard to figure out how to run php inside your .html files.
I'm also having this issue and GoDaddy chat support wasn't able to help me. They suggested I use .htaccess to configure PHP to parse .html files and I created/uploaded a .htaccess which contained:
AddHandler x-httpd-php .html
However, this still doesn't work.