【发布时间】:2013-12-12 11:07:39
【问题描述】:
我有一个 curl 应用程序,在我的 Web 服务上使用 http post/get 请求。 现在,看看这个请求:
http://www.myws.com/index.php?¶m=12345
¶ 是这个符号:¶。我想知道这是否就是我的请求不起作用的原因。 我的请求如下所示:
$url = 'http://www.myws.com/index.php?¶m=12345';
//if i print $url i see the ¶ instead of ¶m
//I tried with index.php?&param=12345 and i can see it "ok" on my screen
//but the request is not working.
curl_setopt($this->ch, CURLOPT_POST, false);
curl_setopt($this->ch, CURLOPT_TIMEOUT, 300);
curl_setopt($this->ch, CURLOPT_URL, $url );
$html = curl_exec($this->ch);
我总是会重定向到主网站,因为该请求不存在。
我该如何解决这个问题? curl 如何查看“请求的 url”?
【问题讨论】: