Re: Re: fopen

From: Date: Sat, 19 Mar 2005 14:48:35 +0000
Subject: Re: Re: fopen
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-211097@lists.php.net to get a copy of this message
Hi, W+ does not work either. I have resorted to adding a blank, 0 byte text file. But it needs chmod 666. Interesting, I add this line: chmod($defaultfile, 666); and it send back an illegal error, but it appears to work anyway - the data is written! What does the at_sign mean at the start of this line? @ $results = fopen($datafilename, "w+"); > try $results = fopen($datafilename, "w+"); $defaultfile = "/home/johj2201/public_html/ffmail.txt"; #default file to write to ... chmod($defaultfile, 666); ... @ $results = fopen($datafilename, "w+"); if (!$results) { die ("Our results file could not be opened for writing. Your score was not recorded. Please contact the person responsible and try again later."); } flock($results, 2); #lock file for writing fwrite($results, $filestr); #write $filestr to $results flock($results, 3); #unlock file fclose($results); #close file

« previous php.general (#211097) next »