工作代码
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://###.#####.###/####/####/T0103/templateCustomWebPage.do?webId=1209221452326&editCurrentLanguage=1209221452328&customWebPageId=1292822288140001019");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
curl_close($ch);
echo $data;[/code]
但如果我使用数据库中的 url 而不是它不起作用。
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $r->url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
将显示以下错误...
parameter is wrong ,please check your input url.
Your input URL:
http://###.#####.###/####/####/T0103/templateCustomWebPage.do?webId=1209221452326&editCurrentLanguage=1209221452328&customWebPageId=1292822288140001019
先感谢您!