.html vs .php | Difference when i write php in both types of extensions

I know we can write PHP in .html format if we edit the .htaccess file.

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

      

What is the difference between editing .htaccess and writing PHP codes in .html file and writing PHP codes in .php file?

+3


source to share


1 answer


There is no difference. PHP written in .html works exactly the same as PHP written in .php files. However, you cannot write HTML to .php files.



-1


source







All Articles