Error preg_match (& nbsp; Location :(.*?) \ N, & nbsp; $ header, & nbsp; $ matches & nbsp;); $ url & nbsp; @ parse_url (& nbsp; @ trim (& nbsp; @ array_pop (& nbsp; & amp; $ matches & nbsp;) & error in code running
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'];
}
The above code also reports an error when running: 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
The code for the first line is: $ url = @ parse_url (@ trim (@ array_pop (& $ matches )));
------ Solution --------------------
$ Url = @ parse_url (@ trim (@ array_pop ($ matches )));