the fseak function sets a cursor to the file but only an offset, a number. Is there a function or a way i can set the cursor to a text file after reading a character or a string? Example, lets say i have this text file:
Hi, welcome to your page!
Is there a way i can insert my name for instance, right after the word “Hi” in the text file?
You can read the file into a string, manipulate the string, then re-save the string to the file. If you’re running PHP5 you should be able to do this: