Re: [PHP] editing a file

2010-05-24 Thread shiplu
You can use shell commands. Like sed, replace etc .. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http:/

Re: [PHP] editing a file

2010-05-24 Thread Ryan Sun
yea, file_get_contents and file_put_contents are the easiest, but play with caution when dealing with large files, 'cause it loads the whole file into memory, fopen() fread() fwrite() can be used for large files. On Mon, May 24, 2010 at 5:56 PM, Rene Veerman wrote: > On Mon, May 24, 2010 at 11:16

Re: [PHP] editing a file

2010-05-24 Thread Andres Gonzalez
thank you Rene, that is the start I needed. -Andres Rene Veerman wrote: On Mon, May 24, 2010 at 11:16 PM, Andres Gonzalez wrote: I have a large C source file that is generated by a separate source-generating program. When the generated src file is compiled, it produces tons of warnings. I

Re: [PHP] editing a file

2010-05-24 Thread Rene Veerman
On Mon, May 24, 2010 at 11:16 PM, Andres Gonzalez wrote: > I have a large C source file that is generated by a separate > source-generating program. When the generated src file is compiled, it > produces tons of warnings. I want to edit the generated src file and delete > the offending lines. > >

[PHP] editing a file

2010-05-24 Thread Andres Gonzalez
I have a large C source file that is generated by a separate source-generating program. When the generated src file is compiled, it produces tons of warnings. I want to edit the generated src file and delete the offending lines. What is the easiest way using a PHP script to read in a file, sea