How to enable cURL in PHP / XAMPP

2019-01-01 03:45发布

How do I enable cURL in PHP?

​​

标签: php curl xampp
16条回答
琉璃瓶的回忆
2楼-- · 2019-01-01 04:15

Check the php version, If you installed php 7.0 version

sudo apt-get install php7.0-curl
sudo service apache2 restart

If you installed php 5.6 version

sudo apt-get install php5-curl
sudo service apache2 restart
查看更多
看风景的人
3楼-- · 2019-01-01 04:16

I found the file located at:

C:\xampp\php\php.ini

Uncommented:

;extension=php_curl.dll
查看更多
弹指情弦暗扣
4楼-- · 2019-01-01 04:19

For windows OS users (It worked for me) in XAMPP.

step 1: Go to C:\xampp\php\php.ini

edit this file php.ini

find curl- you will see a line ;extension=php_curl.dll.

remove semicolon (;)extension=php_curl.dll. so this line looks like

;extension=php_curl.dll

to

extension=php_curl.dll

step 2: copy ssleay32.dll, libeay32.dll from php folder. paste it in C:\Windows\System32\

step 3: Restart the system . Curl will run successfully.

查看更多
泪湿衣
5楼-- · 2019-01-01 04:19

to install php5-curl under opensuse:

sudo yast2

->software ->software management ->search for curl ->check php5-curl case and accept.

after installation you need to restart apache server

service apache2 restart
查看更多
登录 后发表回答