0
 $curl = curl_init($service_url);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
        curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
        $curl_response = curl_exec($curl);
        curl_close($curl); 

我正在使用 php codeigniter,并使用此代码调用 Web 服务。我还更改了 php.ini 和 php 版本中的 curl 并添加了 dll 文件。但是当我尝试运行这段代码时,它给了我一个找不到 curl_init 的错误。有人可以帮我吗?

这是错误

SCREAM:错误抑制忽略(!)致命错误:在第 45 行调用 C:\wamp\www\2\Login\application\controllers\test101.php 中未定义的函数 curl_init()

4

1 回答 1

0

终于找到了答案,我必须删除我的 php 并使用旧的 php 版本,如果有人需要 php 版本,现在它可以正常工作

于 2013-07-27T18:31:53.137 回答