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.
There is such a piece of PHP code in p.php:
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:
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!