This is a discussion on Re: [PHP] fopen within the PHP General forums, part of the PHP Programming Forums category; On Sunday 28 December 2003 11:17 pm, Cesar Aracena wrote: > $fp = fopen("../files/welcome.txt", "...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Sunday 28 December 2003 11:17 pm, Cesar Aracena wrote:
> $fp = fopen("../files/welcome.txt", "a+"); > Change to $fp = fopen("../files/welcome.txt", "r"); Use "r" to read, when you use "a" it appends (or adds) to the file Its also suggested to use the "b" option to so it would look like $fp = fopen("../files/welcome.txt", "rb"); That is done for portability between *nix and windows. More info is at the manual http://us2.php.net/manual/en/function.fopen.php |
![]() |
| Thread Tools | |
| Display Modes | |
|
|