Re: fopen

From: Date: Thu, 06 Mar 2003 01:39:57 +0000
Subject: Re: fopen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138379@lists.php.net to get a copy of this message
the @ before the fopen just tells php to suppress the error message if it can't open the file. that's all it does. "John Taylor-Johnston" <taylorjo@collegesherbrooke.qc.ca> wrote in message news:3E667896.E7660ADE@collegesherbrooke.qc.ca... > #http://www.php.net/manual/en/function.fopen.php > > $contents = fopen ("/home/pathto/file.txt", "r"); > > if ($contents){echo"<textarea>$contents</textarea>";} > else{echo "no contents there";} > > Questions: > What is the use of "@fopen"? > Does anyone see a better way? >

« previous php.general (#138379) next »