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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php