Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

fopen()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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?
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

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

use @ before the fopen() i.e. @fopen()
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

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!
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], shnkrsv and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron