PHP medium static page processing dynamic content ideas

xiaoxiao2021-03-06  35

Recently, I have encountered a problem. All news in the news system is still static, but I want to display dynamic content such as the number of access times in the static page, think about it, there is no good solution. I suddenly think about it today, is it able to solve the frame page?

The basic idea of ​​summarizing is as follows:

First open a static page similar to 20050120.html, showing news and other content, and the number of access times is included, such as the following:

Source: Unknown Published: 2005-01-20 Visits: 21

Then I will include the above content in a PHP program, then call the static page with iframe to call this page.

But now has a new problem, how do I put this static page address and corresponding variables to this frame page for processing?

Ask the master, use JS to handle:

For example, the frame page ID is IFRAME, on the main page οnlοad = "Document.getlementByid (" iframe "). Form1.hidid = '20050120'"

So how do I get this hidid = '20050120', but also use JS, my idea is to obtain this page URL in JS, and then extract through regular expressions, such as my static page name 20050120. HTML, then I will pick 20050120, then pass this value to HIDID, then pass the value to the frame page, the corresponding PHP program can be processed, and print the corresponding results.

I have no specific implementation in this way, but basic ideas have been.

There must be other methods, such as XMLHTTP, just the current knowledge, unable to achieve, if there is a master's better solution, please don't tell!

转载请注明原文地址:https://www.9cbs.com/read-66256.html

New Post(0)