Dynamic content is displayed on the php static page. Recently, when creating a website, you need to generate static pages. However, some content in the generated static pages must be obtained dynamically .. Finally, I checked on the Internet that a static page needs to be generated when I was working on a website recently. However, some content in the generated static page needs to be dynamically obtained. how can I not generate it every day ..
Finally, I checked it online and added a summary .... Finally .. We will study it together .. Oh...
Application 1: Document count to obtain dynamic content
Count page: count. php
The code is as follows:
Require_once './global. php ';
$ DB-> query ("update ". $ tablepre. "teacher set views = views + 1 where id = '". $ _ GET ['id']. "'");
$ Hello = $ DB-> fetch_one_array ("select * from". $ tablepre. "teacher where id = '". $ _ GET ['id']. "'");
$ Hcount = $ hello ['Views '];
?>
Document. write (" ");
Add it to the static page mk.html.