PrintNow/ChaoxingSign

PHP8命令行跑不起来但网页正常

BA7JCM opened this issue · 1 comments

命令行跑不起来,报错:
”PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in D:\phpstudy_pro\WWW\tp5\public\cx\lib\Functions.php:119
Stack trace:
#0 D:\phpstudy_pro\WWW\tp5\public\cx\main.php(46): curl_get('http://mooc1-ap...', 'D:\phpstudy_pro...')
#1 {main}
thrown in D:\phpstudy_pro\WWW\tp5\public\cx\lib\Functions.php on line 119

Fatal error: Uncaught Error: Call to undefined function curl_init() in D:\phpstudy_pro\WWW\tp5\public\cx\lib\Functions.php:119
Stack trace:
#0 D:\phpstudy_pro\WWW\tp5\public\cx\main.php(46): curl_get('http://mooc1-ap...', 'D:\phpstudy_pro...')
#1 {main}
thrown in D:\phpstudy_pro\WWW\tp5\public\cx\lib\Functions.php on line 119“
PHP版本是8.0.3,但是网页方式又能跑起来(我电脑本地有环境直接跑网页)
php-8.0.3-Win32-vs16-x64.log
附上log文件

检查下是否启用或安装 curl 扩展,看你的报错,我认为是没有启用或安装 curl 扩展

Fatal error: Uncaught Error: Call to undefined function curl_init()