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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> #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?
>



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

Reply via email to