PHP file can be transferred to HTM

Source: Internet
Author: User
can php files be converted to HTM?
A good parameter php file, want to get the final display of the HTM file, in the background how can do?
------Solution--------------------
Ob_start (' HTML ');
function html ($s) {
File_put_contents (basename ($_server[' php_self '). '. htm ', $s);
}
//......
------Solution--------------------
The moderators have already said
You check these 3 functions Ob_start ob_get_contents file_put_contents
------Solution--------------------
echo file_get_contents (' http://www.domain.com/index.php?action=xxx '); Get the generated HTML directly
------Solution--------------------
Are you trying to say, pseudo-static?

Rewrite ^ (. *)/index_ (\d+) _ (\d+) _ (\d+). html$ $1/index.php?val1=$2&val2=$3&val3=$4 last;

This is mainly to transform/index.php?val1=121&val2=222&val3=232 into/index_121_222_232.html form.
  • 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.