How to implement PHP to modify arbitrary html file content and save the original file name

Source: Internet
Author: User
Ask how to implement PHP to modify any html file and save the original file name. for example, if you have a 1.html file, use the PHP program to modify any content in 1.html and save it.
1. for example, the content in html contains
111111111112222222abc222233333333333333334444444444

Ghost wants to use PHP to read all the 1.html source code and put it in an edit box. then, you can modify any content in it and click save to save it. How can this be achieved? It is a bit similar to the template file modification in the DEDE background, but it is not that complicated. Thank you for your advice!


Reply to discussion (solution)

?? After that, submit? Rong ?, Need to set the original? File path? Also submitted,
Then server? File_put_contents (file name, file? Capacity, true); you can.

?? After that, submit? Rong ?, Need to set the original? File path? Also submitted,
Then server? File_put_contents (file name, file? Capacity, true); you can.



How can I call it ?? Is there any complete process code? Beginner! Not quite understood! Thank you for your guidance!

Http://www.example.com/index.php? File00001.html

And then in the same object? Lower? Create? 1. html
Index. php

    
   New Document     

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.