Jump to content

Edit file with PHP


darkeye

Recommended Posts

Hello,

 

I have a fairly simple problem, I'm just new to PHP programming, so I hope you can help me! :)

 

Here is my issue.

 

I want a PHP file to be able to edit itself.

I can append to the file, using file_put_contents, but the problem is the PHP close tag, ?>.

How would I overwrite those two characters so I can add to the script itself, rather than just append to the file?

 

Thanks a lot!

Link to comment
https://forums.phpfreaks.com/topic/183926-edit-file-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.