Home >Backend Development >PHP Problem >How to execute php in html

How to execute php in html

王林
王林Original
2019-10-19 13:53:416324browse

How to execute php in html

Execution process of php embedded in html

When the php function module is processing a php file, it only cares about the php code (using php tag), for non-php code, it will be output as is. For example:

How to execute php in html

When the php function module parses this file, it will return all the html code to apache as it is. For the content output by php, it will return the result to apache. Apache returns the final result to the client for browser analysis.

Tips:

1. JS code can also be returned in php as a string, and finally executed in the browser;

2. php Only the code within the tag is processed; js, html, and css are all strings for PHP;

How to execute php in html

##Recommended tutorial:

PHP Video tutorial

The above is the detailed content of How to execute php in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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