[ubuntu],该如何解决
程序员文章站
2024-02-01 17:14:28
...
[ubuntu]
$ch=cur_init();
执行出错,提示
PHP Fatal error: Call to undefined function cur_init() ;
但是已经安装了php5 php5-curl php-cli curl
#curl -V
curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
#php -v
PHP 5.3.10-1ubuntu3.13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:54:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
但是查看是否加载了扩展,提示确实没有加载:
Exception: Extension curl does not exist
请问如何解决此问题呢?
------解决方案--------------------
你是把curl_init写成了cur_init了吗
$ch=cur_init();
执行出错,提示
PHP Fatal error: Call to undefined function cur_init() ;
但是已经安装了php5 php5-curl php-cli curl
#curl -V
curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
#php -v
PHP 5.3.10-1ubuntu3.13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:54:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
但是查看是否加载了扩展,提示确实没有加载:
Exception: Extension curl does not exist
请问如何解决此问题呢?
------解决方案--------------------
你是把curl_init写成了cur_init了吗
相关文章
相关视频