|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (2 bit)
Join Date: Mar 2004
Location: EarthPlanet
Posts: 2
|
Writing to a file. (PHP)
It's possible to ammend data within a file vs. just adding data to the beginning or the end of the file? Mean to change something in the "middle" of the file.
Thanks. |
|
|
|
|
|
#2 |
|
PCMech Founder
Staff
|
You would need to do a string search of the string to find the position in the file (with strpos() or something like that), then yes, you could do it.
|
|
|
|
|
|
#3 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
You can do it but in general it is not a great idea since it will become quite slow as the .txt file grows. Your best bet is always to store the data in a database.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|