Sunday, 15 January 2012

PHP in HTML files not running or being commented out -



PHP in HTML files not running or being commented out -

first of all, not trying run php within js script, there similar question on here refers user trying run php within js script.

i have added many combinations of

addtype application/x-httpd-php .php .html

addhandler x-httpd-php .html

to .htaccess file in higher level directory containing .html file want run php in. has not worked. (i open trying new combinations)

the either not read @ or commented out when viewing source in broswer.

my question how run within of html file or there improve way include php functionality in html document without having code in same document.

additionally host uses cpanel if helps anything.

i can elaborate on need to, in advance.

you can seek utilize mod_rewrite task:

rewriteengine on rewriterule ^(.*).html index.php [qsa]

php html .htaccess cpanel

No comments:

Post a Comment