|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
modify text file with php
I have included a zip file which you can download from my site. http://www.dreamingdigital.ca/www.zip the passwords to login are both "demo"
I have a problem with my modify.php and modifyme.php files. I do not know how to fix the extra lines php is throwing into my .dat file when it writes the data back into the file. What happens: Php reads in the ppt.dat file as a 2D array in modify.php User inputs which string to delete. Php sends that number to the modifyme.php file which reads the ppt.dat file to an array, omits the string which it is told to delete, then continues writing the rest of the array. The Problem: The 1st modification works flawlessly. The 2nd modification PHP throws in phantom extra lines every other line in the ppt.dat file!! This messes up how the ppt.dat file gets read in the arrays. Thank you in advance. Colin Puttick Webmaster Dreaming Digital www.dreamingdigital.ca |
|
#2
|
|||
|
|||
|
RE: modify text file with php
i can't download from where i'm at but it sounds like when re-writing the array you're writing some new lines..
can u include the code here? |
|
#3
|
|||
|
|||
|
RE: modify text file with php
it looks like (i also didn't dl-ed file) u are joining that array with new lines, 'n' instead just ''.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > modify text file with php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|