Home > Backend Development > PHP Tutorial > 代码运行时报错

代码运行时报错

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:39:56
Original
1127 people have browsed it

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.6\htdocs\source\core\util\class.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 ) ) );

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template