Re: [PHP] URGENT! Regarding file writing

2001-02-13 Thread Michael McGlothlin
Without knowing exactly what you're doing I'd say it's easiest to read the entire file into an array, modify the line you want, and write the file back out. Then you could easily modify any line you wanted. Otherwise check out fseek () in the PHP manual. whatever wrote: > How to do that? I me

Re: [PHP] URGENT! Regarding file writing

2001-02-13 Thread whatever
How to do that? I mean how to set file pointer to certain line? I've tried ftel() but it returns starnge number like 17534 decrementing it causes file-handle error Yes i do have adequate permissions to modify the file in question on Win2000 10x in advance Nemanja NOTE: My email is incorrect. Plea

Re: [PHP] URGENT! Regarding file writing

2001-02-13 Thread Michael McGlothlin
Did you try taking the line you wanted to change and doing a minus one to get the right line number? Not sure why windows won't change the file. I'm assuming you have the proper permissions to do what your trying to do? whatever wrote: > Hi! > I would like to know how to overwrite line in fil

[PHP] URGENT! Regarding file writing

2001-02-13 Thread whatever
Hi! I would like to know how to overwrite line in file which matches certain condition. Best thing i managed so far is to write line AFTER the line i wanted to overwrite under Linux. No such luck under Win2000 which refuses to write anything to a file but file date/time property has been changed.