file_get_contents synchronous or asynchronous

前端 未结 3 1148
花落未央
花落未央 2021-01-14 02:41

Today I came across one situation.

I am using file_get_contents to get token from a file for a user.

$data=file_get_contents(\"http://ex         


        
3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 03:11

    the best way to waiting for file_get_contents, i hop that help you.

    if ($result = file_get_contents("http://exemple.com", false)) {
     echo $result; // for exemple
    }
    

提交回复
热议问题