庆云php

庆云php

Windows 使用Composer安装ThinkPHP6时报错,注意,可能是你的php版本过高或过低,你都将装不上

PHP 0

2023年11月20日 每日一猜答案: 答案:ABC
每日一猜答案分析:

在参照ThinkPHP6中文官网的安装手册安装时,使用 执行命令: composer create-project topthink/think tp6 在命令行下面,切换到你的项目根目录下(tp)执行以下命令。
  1. composer require topthink/think-multi-app
命令时报错。 [ComposerDownloaderTransportException] Unable to use a proxy: malformed http_proxy url   解决办法: 执行 set http_proxy=0 后在执行上述代码即可安装成功。   如果报这个错,记得去开启php.ini中对庆的 openssl 扩展即可。 [Composer\Exception\NoSslException] The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl ex tension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true. Failed to download psr/container from dist: Unable to use a proxy: malformed http_proxy url Now trying to download from source [Composer\Downloader\TransportException] Unable to use a proxy: malformed http_proxy url   Script@php think服务:发现处理返回错误代码255的自动加载后转储事件 Script @php think service:discover handling the post-autoload-dump event returned with error code 255   等等这些问题,根源就在你的PHP版本与你要下载的ThinkPHP6不相匹配。 注意:ThinkPHP6 可以在php7.3以上,php8.0.2及以上,更宽泛的php版本没有测试,大家测试了可以分享出来。