How to call php files in html

Release: 2023-02-27 22:56:02
Original
15777 people have browsed it

How to call php files in html

It seems that the php file cannot be called directly in the static page, but the php file can be called using the js calling method.

Recommended:php server

If you use the following call in the page demo.html, you can pass the parameter of f=onestopweb to p.php.

    
Copy after login

There is such a piece of PHP code in p.php:

Copy after login

When the demo.html file is executed, the p.php file will be called, and the output of the p.php file will be used as JS statement is executed, and the content is the value of parameter f passed by JS, which is the value of the action received in the PHP file.

Rendering:

How to call php files in html

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

Related labels:
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!