How to use PHP in pure HTML

WBOY
Release: 2016-08-04 09:21:43
Original
1232 people have browsed it

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?

Reply content:

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.

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template