Check to see if cURL is installed locally?

后端 未结 5 1216
难免孤独
难免孤独 2020-12-29 18:13

How do I check if cURL is installed on my local server instance?

Does it matter what type of server I\'m running to check it?

Is

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 18:47

    To extend the answer above and if the case is you are using XAMPP. In the current version of the xampp you cannot locate the curl_exec in the php.ini, just try using

    ';
    var_dump(curl_version());
    echo '
    '; ?>

    and save to your htdocs. Next go to your browser and paste

    http://localhost/[your_filename].php
    

    if the result looks like this

    array(9) {
      ["version_number"]=>
      int(469760)
      ["age"]=>
      int(3)
      ["features"]=>
      int(266141)
      ["ssl_version_number"]=>
      int(0)
      ["version"]=>
      string(6) "7.43.0"
      ["host"]=>
      string(13) "i386-pc-win32"
      ["ssl_version"]=>
      string(14) "OpenSSL/1.0.2e"
      ["libz_version"]=>
      string(5) "1.2.8"
      ["protocols"]=>
      array(19) {
        [0]=>
        string(4) "dict"
        [1]=>
        string(4) "file"
        [2]=>
        string(3) "ftp"
        [3]=>
        string(4) "ftps"
        [4]=>
        string(6) "gopher"
        [5]=>
        string(4) "http"
        [6]=>
        string(5) "https"
        [7]=>
        string(4) "imap"
        [8]=>
        string(5) "imaps"
        [9]=>
        string(4) "ldap"
        [10]=>
        string(4) "pop3"
        [11]=>
        string(5) "pop3s"
        [12]=>
        string(4) "rtsp"
        [13]=>
        string(3) "scp"
        [14]=>
        string(4) "sftp"
        [15]=>
        string(4) "smtp"
        [16]=>
        string(5) "smtps"
        [17]=>
        string(6) "telnet"
        [18]=>
        string(4) "tftp"
      }
    }
    

    curl is enable

提交回复
热议问题