公告
财富商城
积分规则
提问
发文
2019-01-01 03:45发布
何处买醉
How do I enable cURL in PHP?
Since you're using XAMPP, uncomment the line
;extension=php_curl.dll
in xampp\apache\bin\php.ini, and then restart the Apache service.
xampp\apache\bin\php.ini
NB: In newer XAMPP versions, PHP has moved to root xampp folder xampp\php\php.ini.
xampp\php\php.ini
You can check phpinfo() (create a script containing and browse to it). This will tell you if you really do have it enabled. If not, read here.
phpinfo()
It is not recommended for the faint-hearted Windows developer.
For Ubuntu (and probably all Debian-Based) Linux Distributions:
sudo apt-get install php5-curl sudo /etc/init.d/apache2 restart
You might have seen PHP Fatal error: Call to undefined function curl_init() before.
PHP Fatal error: Call to undefined function curl_init()
check if curl module is available
$ ls -la /etc/php5/mods-available/
enable the curl module
$ sudo php5enmod curl
source: http://baligena.com/installing-curl-ubuntu-server/
On Debian with Apache 2:
apt-get install php5-curl /etc/init.d/apache2 restart
(php4-curl if it's php4)
You compile your PHP using --with-curl.
--with-curl
最多设置5个标签!
Since you're using XAMPP, uncomment the line
in
xampp\apache\bin\php.ini
, and then restart the Apache service.NB: In newer XAMPP versions, PHP has moved to root xampp folder
xampp\php\php.ini
.You can check
phpinfo()
(create a script containing and browse to it). This will tell you if you really do have it enabled. If not, read here.It is not recommended for the faint-hearted Windows developer.
For Ubuntu (and probably all Debian-Based) Linux Distributions:
You might have seen
PHP Fatal error: Call to undefined function curl_init()
before.check if curl module is available
enable the curl module
source: http://baligena.com/installing-curl-ubuntu-server/
On Debian with Apache 2:
(php4-curl if it's php4)
You compile your PHP using
--with-curl
.