原因是没有开启openssl扩展。

不过,在windows环境下还有一个需要注意的,就是php.ini文件中extension_dir需要修改为绝对路径,

如下:

extension_dir="C:\phpstudy_pro\Extensions\php\php7.4.3nts\ext"