Home  >  Article  >  Backend Development  >  How to call php files from html static pages, _PHP tutorial

How to call php files from html static pages, _PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:14:10788browse

How to call php files from html static pages,

The example in this article describes the method of calling php files from html static pages. Share it with everyone for your reference. The specific method is as follows:

It seems that the php file cannot be called directly in the static page, but you can use the js calling method to call the php file. Of course, you can also use ajax to call the php file. Let me introduce it to you below:

Give a simple example to illustrate:

For example, if you use the following call in page a.html, you can pass the action=test parameter to b.php.
Javascript code

Copy code The code is as follows: