Home > Article > Backend Development > How to use PHP in pure HTML
Generally, PHP is uninstalled from the .php file. Sometimes, when the PHP code is placed in .html, it is not parsed. How can the PHP code in the *.html file be parsed?
Generally, PHP is uninstalled from the .php file. Sometimes, when the PHP code is placed in .html, it is not parsed. How can the PHP code in the *.html file be parsed?
You can set files with .html suffix in the server to also be parsed by php
It is not recommended to do this, and basically no one does it.
If you insist on implementing it this way, then force it to be set in the Web Server so that when accessing .html files, they will be parsed by the PHP parser.
In addition to the above, Smarty specializes in template separation.