How to enable cURL in PHP / XAMPP

后端 未结 18 1699
难免孤独
难免孤独 2020-11-22 15:28

How do I enable cURL in PHP?

​​

相关标签:
18条回答
  • 2020-11-22 15:38

    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
    
    0 讨论(0)
  • 2020-11-22 15:39

    Basic tip: After enabling the CURL in php.ini file, you need to restart the web server to make it work (my experience says).

    0 讨论(0)
  • 2020-11-22 15:40

    In SUSE Linux:

    zypper in php5-curl
    rcapache2 restart
    
    0 讨论(0)
  • 2020-11-22 15:40

    You compile your PHP using --with-curl.

    0 讨论(0)
  • 2020-11-22 15:40

    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/

    0 讨论(0)
  • 2020-11-22 15:44

    I found the file located at:

    C:\xampp\php\php.ini
    

    Uncommented:

    ;extension=php_curl.dll
    
    0 讨论(0)
提交回复
热议问题