Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BA7JCM opened this issue May 1, 2021 · 1 comment
Open

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

BA7JCM opened this issue May 1, 2021 · 1 comment

Comments

@BA7JCM
Copy link

BA7JCM commented May 1, 2021

命令行跑不起来,报错:
”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文件

@BA7JCM BA7JCM changed the title PHP8命令行跑不起来 PHP8命令行跑不起来但网页正常 May 1, 2021
@PrintNow
Copy link
Owner

PrintNow commented May 2, 2021

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants