Re: fopen

From: Date: Mon, 29 Dec 2003 06:20:14 +0000
Subject: Re: fopen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173413@lists.php.net to get a copy of this message
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

« previous php.general (#173413) next »