Fsockopen error handling, at the moment I get warnings and page stops further content from loading

前端 未结 1 1892
庸人自扰
庸人自扰 2021-01-28 17:15

I have the following code:

$open_socket = fsockopen($host,$port,$errno,$errstr,30);
if(!$open_socket){
    echo \"$errstr ($errno)
\".$nl; }else{
相关标签:
1条回答
  • 2021-01-28 17:23

    You can supress warnings calling fsockopen

    $open_socket = @fsockopen($host,$port,$errno,$errstr,30);
    
    0 讨论(0)
提交回复
热议问题