Php static page displays dynamic content _ PHP Tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.