preg_match( "/Location:(.*?)\n/", $header, $matches );
$url = @parse_url( @trim( @array_pop( &$matches ) ) );
if ( !$url)
{
$curl_loops = 0;
return $data;
}
$last_url = parse_url( curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL ) );
if ( !$url['scheme'] )
{
$url['scheme'] = $last_url['scheme'];
}
上面这段代码运行时也报错:Warning: Call-time pass-by-reference has been deprecated in E:PHPnow-1.5.6htdocssourcecoreutilclass.curl.php on line 229
229行代码是:$url = @parse_url( @trim( @array_pop( &$matches ) ) );
allow_call_time_pass_reference=true
参见:http://php.net/manual/en/language.references.pass.php
$url = @parse_url( @trim( @array_pop( $matches ) ) );
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号