> Hi All
> I know how to open, read & write to files using Php.
> But how can you write some content to a particular place in a file, Not
> the start or end but say the middle some where.
> Basic html file
> Write my stuff here!!!
> This eventually will relate to a db so I hope its not completely of
It doesn't seam to be database related...
But any way....
1st solution( recommended ):
- read the entire file into a string( fread, )
- do a string relacement, ie: replace the string "<body></body>" with
the string "<body>what you want</body>". 2st solution:
- use fseek function to place the file "pointer" where you want
- write the string to the file
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php