Re: Re: fopen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux