Having issues with Parsing PHP in .HTML Files -


i have issue parsing php in html files.

i using install of vesta , domain running fine. site in question has

addtype application/x-httpd-php4 .htm .html # ,  addtype application/x-httpd-php5 .htm .html 

in , before moved server allowing php run in html. have tried every single variant of have found on stack overflow , none of them working.

i can't figure out life of me why not working?

has got ideas? thank dan williams

since server will not allow use php in html, rewrite .html requests php in :

rewriteengine on rewriterule ^(.*)\.html$ $1.php [l] 

should solve problem. (https://stackoverflow.com/a/5990276/2119863)

why won't parse php in html?

the more types of files server needs push through php interpreter, more memory, processor , electricity consume. it's cars , trucks. cars not haul big trailors reason - trucks have bigger engines , take load leave bigger carbon footprint.

the second reason separation of functionalities. seeing html file, should 100% confident - across , servers - file not print_r($_server);. , when seeing php file, should confident performs dynamic actions. , shouldn't expect nurse build houses, neither should expect html parse php. :)


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -