You are here: Re: [PHP] Re: fopen « PHP « IT news, forums, messages
Re: [PHP] Re: fopen

Posted by John Taylor-Johnston on 03/19/05 16:48

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация