|
Posted by John Taylor-Johnston on 03/19/05 08:09
P.S., I've checked the doc and tried "a+". It still does not create ffmail.txt.
@ $results = fopen($datafilename, "a+");
# Open for reading and writing; place the file pointer at the end of the file.
#If the file does not exist, attempt to create it
It does not create it.
John
> FOpen question. My script is dying. "Our results file could not be opened for writing"
> What can I add to get more info from the die? Do I «have» to specify a pathname in $defaultfile?
>
> John
>
> $defaultfile = "ffmail.txt"; #default file to write to
> @ $results = fopen($datafilename, "a"); #open file and supress errors
> #print custom error if file doesn't exist or improper permissions
> if (!$results) { die ("Our results file could not be opened for writing."); }
--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not Open Source, it's Murphy's Law."
' ' ' Collège de Sherbrooke:
ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/
- 819-569-2064
°v° Bibliography of Comparative Studies in Canadian, Québec and Foreign Literatures
/(_)\ Université de Sherbrooke
^ ^ http://compcanlit.ca/ T: 819.569.2064
Navigation:
[Reply to this message]
|