I just installed pecl_http with the default options and added the line "extension=http.so" to my active php.ini configuration file, but when I run my script I'm still getting
我刚刚使用默认选项安装了pecl_http,并将“extension = http.so”行添加到我的活动php.ini配置文件中,但是当我运行我的脚本时,我仍然得到
Call to undefined function http_post_fields()
调用未定义的函数http_post_fields()
Any ideas on what I can check to fix the problem?
关于我可以检查什么以解决问题的任何想法?
Here's the code:
这是代码:
$url = "http://localhost/elistings/public/dynamicSearch.php";
$data = array("phone_number" => "",
"business_name" => "name",
"business_address" => "my address",
"city_and_state" => "city, CA",
);
$response = http_post_fields($url, $data);
echo $response;
1 个解决方案
#1
0
After verifying that pecl_http was successfully installed, have you tried this?
在验证pecl_http已成功安装后,您试过这个吗?
We have to activate the module, don't modify the file /etc/php.ini, but add a file pecl_http.ini in /etc/php.d
我们必须激活模块,不要修改文件/etc/php.ini,而是在/etc/php.d中添加文件pecl_http.ini
; Enable pecl_http extension module extension=http.so
restart Apache
#1
0
After verifying that pecl_http was successfully installed, have you tried this?
在验证pecl_http已成功安装后,您试过这个吗?
We have to activate the module, don't modify the file /etc/php.ini, but add a file pecl_http.ini in /etc/php.d
我们必须激活模块,不要修改文件/etc/php.ini,而是在/etc/php.d中添加文件pecl_http.ini
; Enable pecl_http extension module extension=http.so
restart Apache