![]() |
Adding content to a specific line in file
I'm relatively new to PHP so bare with me.I'm trying to replace a specific line to a file. This is my code so far:
PHP Code:
Cheers. |
Half way there, at the moment your script should read each line, but it wont write to file.
How about this: PHP Code:
|
Ah thanks boy, that works a treat!
|
Here's a function for this. Haven't tested, but should work.
Pretty easy to use as the following example: PHP Code:
Function: php Code:
|
I knew I had written a function with the exact same name! Thief :-(
|
Yea, it was a great function, I'm still using it! However I had to modify it for this cause though. Sorry xD
|
| All times are GMT. The time now is 02:27 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0