ID: 15132 Updated by: torben Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: Non stated PHP Version: 4.1.1 New Comment:
No, there isn't--for one thing, the system fopen() call won't do it. However, what you can do is create a new file with a temporary name (see tempnam()), write your new content to it, append the contents of the original file, delete the original file, and rename the new file with the name of the original one. BTW, you shouldn't use the bug database to ask questions; that's what the mailing lists are for. Using the bug database for this sort of thing just clogs it up... Torben Previous Comments: ------------------------------------------------------------------------ [2002-01-20 21:40:43] [EMAIL PROTECTED] In the fopen function, the +r writes the file to the beginning of the file, correct? Now, I have a file with other content inside of that file. I want to add text, in front of that text, without messing with any of the original text. Is there already something that does this? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15132&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]