pecl 安装 pecl_http 不工作。

pecl install pecl_http not working.

我已经使用以下命令为 php 安装了 http 扩展,

**pecl install pecl_http**

它成功了,但是我在我的文件夹中找不到 http.so 扩展 /usr/lib/php5/20121212+lfs 文件夹。 有什么我必须做的吗?

我已经使用以下功能实现了 http 发布。 我刚刚在互联网上找到它。

函数http_post_lite($url, $data, $headers=null) {

$data = http_build_query($data);    
$opts = array('http' => array('method' => 'POST', 'content' => $data,'header' => "Content-Type: application/x-www-form-urlencoded\r\n"));


if($headers) {
    $opts['http']['header'] = $headers;
}
$st = stream_context_create($opts);
$fp = fopen($url, 'rb', false, $st);

if(!$fp) {
    return false;
}
return stream_get_contents($fp);
}