Re: Edit a file
| From: | David Otton | Date: | Sun, 18 May 2003 14:59:00 +0000 |
| Subject: | Re: Edit a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148084@lists.php.net to get a copy of this message | ||
On Sun, 18 May 2003 15:33:05 +0100, you wrote:
>How can i open a file and change the contents of everything in the file that
>lands between the <script> </script> tags?
I'm sure this is the second time you've asked this question, and you already
got one answer with example code. What exactly are you trying to accomplish?
Open a file: fopen()
http://www.php.net/manual/en/function.fopen.php
Read the contents of a file: file(), fread(), fgets(), etc.
http://www.php.net/manual/en/ref.filesystem.php
To modify a string once it's in memory: string and regex functions
http://www.php.net/manual/en/ref.strings.php
http://www.php.net/manual/en/ref.pcre.php
http://www.php.net/manual/en/ref.regex.php
Without a more specific question, you're unlikely to get more specific help.