📌  相关文章
📜  file_get_contents php 代码示例

📅  最后修改于: 2022-03-11 14:54:53.758000             🧑  作者: Mango

代码示例6
function url_get_contents ($Url) {
    if (!function_exists('curl_init')){ 
        die('CURL is not installed!');
    }
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $Url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $output = curl_exec($ch);
    curl_close($ch);
    return json_decode($output,JSON_OBJECT_AS_ARRAY);
}