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

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]


Удаленная работа для программистов  •  Как заработать на 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

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