fopen()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

fopen()

Postby liquedus » Wed Jun 25, 2003 6:57 am

i have something like this now:

$h = fopen("url?name=mine","r");
if($h){
execute some code...
}

but i still get a warning in the output file if fopen fails to connect to the url.

my question is is there a way to catch the error so it doesnt display in the output file?

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Wed Jun 25, 2003 4:48 pm

use @ before the fopen() i.e. @fopen()

liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

Postby liquedus » Wed Jun 25, 2003 6:00 pm

ahhhh.... yes.... lol, now that i think about it, I dont know why i didnt figure that out myself, since I use it when selecting a mysql table.... :oops: .... thanks!


Return to “PHP coding => General”

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests

cron