|
|
#1 | |
|
Beta Member
Join Date: Mar 2009
Posts: 5
|
I'm trying to write a code that takes two variables entered by the user via input boxes and saves them in a text file, without overwriting other entries. Unfortunately the strings are not showing up in the text file. Heres the code I'm using
Quote:
|
|
|
|
|
|
|
#2 | |
|
Solid State Member
Join Date: Feb 2011
Posts: 17
|
The PHP may not have read/write permissions for your file. If you didn't it would probably throw some kind of error, but depending on the context you may not see it (eg via AJAX). Try outputing some values (ie the return values for fopen, fwrite and fclose) and maybe making the code a bit more robust by throwing in some ifs like
Quote:
Just a side note, because of the carriage return with the newline character I'm assuming you're processing this file on a windows system? |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|