composer包管理器安装
https://getcomposer.org/Composer-Setup.exe
集成环境
- phpstudy --> 小皮
- phpenv
TP的安装
修改为国内的阿里云源:
- 要求php版本不低于php8
Cannot use topthink/think’s latest version v8.0.0 as it requires php >=8.0.0 which is not satisfied by your platform.
- 当升级到PHP8版本时,可能会出现如下报错:
解决办法:
- 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.
- 配置ssl扩展,编辑php.ini文件,加入下面两行
- Alternatively, you can run Composer with
--ignore-platform-req=ext-fileinfo
to temporarily ignore these required extensions.
或者在php.ini配置:
- 访问网站时报错:You don’t have permission to access / on this server.