157 TP5报错Fatal error: require(): Failed opening required '/home/www/xx/public/../thinkphp/start.php

博客提供了两个网页链接,分别是百度经验和博客园的文章,提示遇到TP5中require()函数打开文件失败的问题,可搜索百度经验获取相关解决办法。
[root@yfw ~]# cd /www/wwwroot/yfw.szrengjing.com [root@yfw yfw.szrengjing.com]# ./deploy.sh 🔧 开始自动化部署... fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git No composer.json in current directory, do you want to use the one at /www/wwwroot? [Y,n]? y Always want to use the parent dir? Use "composer config --global use-parent-dir true" to change the default. Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Generating optimized autoload files 1 package you are using is looking for funding. Use the `composer fund` command to find out more! Could not open input file: think Could not open input file: think chown: changing ownership of 'public/.user.ini': Operation not permitted chmod: changing permissions of 'public/.user.ini': Operation not permitted PHP Warning: require(/www/wwwroot/yfw.szrengjing.com/vendor/autoload.php): failed to open stream: No such file or directory in Standard input code on line 2 Warning: require(/www/wwwroot/yfw.szrengjing.com/vendor/autoload.php): failed to open stream: No such file or directory in Standard input code on line 2 PHP Fatal error: require(): Failed opening required '/www/wwwroot/yfw.szrengjing.com/vendor/autoload.php' (include_path='.:') in Standard input code on line 2 Fatal error: require(): Failed opening required '/www/wwwroot/yfw.szrengjing.com/vendor/autoload.php' (include_path='.:') in Standard input code on line 2 Failed to reload php7.4-fpm.service: Unit php7.4-fpm.service not found. 🎉 部署完成 [root@yfw yfw.szrengjing.com]# lsattr /www/wwwroot/yfw.szrengjing.com/public/.user.ini ----i---------e----- /www/wwwroot/yfw.szrengjing.com/public/.user.ini [root@yfw yfw.szrengjing.com]# chattr -i /www/wwwroot/yfw.szrengjing.com/public/.user.ini [root@yfw yfw.szrengjing.com]# cd /www/wwwroot [root@yfw wwwroot]# [root@yfw wwwroot]# # 备份旧站点 [root@yfw wwwroot]# mv yfw.szrengjing.com yfw.szrengjing.com.bak [root@yfw wwwroot]# [root@yfw wwwroot]# # 使用 Composer 创建新 TP6 项目 [root@yfw wwwroot]# composer create-project topthink/think yfw.szrengjing.com Creating a "topthink/think" project at "./yfw.szrengjing.com" Cannot use topthink/think's latest version v8.1.3 as it requires php >=8.0.0 which is not satisfied by your platform. Installing topthink/think (v6.1.0) - Downloading topthink/think (v6.1.0) - Installing topthink/think (v6.1.0): Extracting archive Created project in /www/wwwroot/yfw.szrengjing.com Loading composer repositories with package information Updating dependencies Lock file operations: 17 installs, 0 updates, 0 removals - Locking league/flysystem (1.1.10) - Locking league/flysystem-cached-adapter (1.1.0) - Locking league/mime-type-detection (1.16.0) - Locking psr/cache (1.0.1) - Locking psr/container (1.1.2) - Locking psr/http-message (1.1) - Locking psr/log (1.1.4) - Locking psr/simple-cache (1.0.1) - Locking symfony/polyfill-mbstring (v1.33.0) - Locking symfony/polyfill-php72 (v1.31.0) - Locking symfony/polyfill-php80 (v1.33.0) - Locking symfony/var-dumper (v4.4.47) - Locking topthink/framework (v6.1.5) - Locking topthink/think-filesystem (v1.0.3) - Locking topthink/think-helper (v3.1.11) - Locking topthink/think-orm (v2.0.62) - Locking topthink/think-trace (v1.6) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 17 installs, 0 updates, 0 removals - Downloading psr/cache (1.0.1) - Downloading psr/container (1.1.2) - Downloading psr/http-message (1.1) - Downloading symfony/var-dumper (v4.4.47) - Downloading topthink/think-helper (v3.1.11) - Downloading psr/simple-cache (1.0.1) - Downloading psr/log (1.1.4) - Downloading topthink/think-orm (v2.0.62) - Downloading topthink/framework (v6.1.5) - Downloading league/flysystem (1.1.10) - Downloading league/flysystem-cached-adapter (1.1.0) - Downloading topthink/think-filesystem (v1.0.3) - Downloading topthink/think-trace (v1.6) - Installing league/mime-type-detection (1.16.0): Extracting archive - Installing psr/cache (1.0.1): Extracting archive - Installing psr/container (1.1.2): Extracting archive - Installing psr/http-message (1.1): Extracting archive - Installing symfony/polyfill-php80 (v1.33.0): Extracting archive - Installing symfony/polyfill-php72 (v1.31.0) - Installing symfony/polyfill-mbstring (v1.33.0): Extracting archive - Installing symfony/var-dumper (v4.4.47): Extracting archive - Installing topthink/think-helper (v3.1.11): Extracting archive - Installing psr/simple-cache (1.0.1): Extracting archive - Installing psr/log (1.1.4): Extracting archive - Installing topthink/think-orm (v2.0.62): Extracting archive - Installing topthink/framework (v6.1.5): Extracting archive - Installing league/flysystem (1.1.10): Extracting archive - Installing league/flysystem-cached-adapter (1.1.0): Extracting archive - Installing topthink/think-filesystem (v1.0.3): Extracting archive - Installing topthink/think-trace (v1.6): Extracting archive 12 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating autoload files > @php think service:discover Succeed! > @php think vendor:publish Succeed! 6 packages you are using are looking for funding. Use the `composer fund` command to find out more! Found 1 security vulnerability advisory affecting 1 package. Run "composer audit" for a full list of advisories. [root@yfw wwwroot]# ls -la /www/wwwroot/yfw.szrengjing.com total 108 drwxr-xr-x 10 root root 4096 Nov 14 17:05 . drwxr-xr-x 13 www www 4096 Nov 14 17:05 .. drwxr-xr-x 3 root root 4096 Oct 24 2022 app -rw-r--r-- 1 root root 1138 Oct 24 2022 composer.json -rw-r--r-- 1 root root 37667 Nov 14 17:05 composer.lock drwxr-xr-x 2 root root 4096 Nov 14 17:05 config -rw-r--r-- 1 root root 231 Oct 24 2022 .example.env drwxr-xr-x 2 root root 4096 Oct 24 2022 extend -rw-r--r-- 1 root root 34 Oct 24 2022 .gitignore -rw-r--r-- 1 root root 1822 Oct 24 2022 LICENSE.txt drwxr-xr-x 3 root root 4096 Oct 24 2022 public -rw-r--r-- 1 root root 1459 Oct 24 2022 README.md drwxr-xr-x 2 root root 4096 Oct 24 2022 route drwxr-xr-x 2 root root 4096 Oct 24 2022 runtime -rw-r--r-- 1 root root 180 Oct 24 2022 think -rw-r--r-- 1 root root 2038 Oct 24 2022 .travis.yml drwxr-xr-x 8 root root 4096 Nov 14 17:05 vendor drwxr-xr-x 2 root root 4096 Oct 24 2022 view [root@yfw wwwroot]#
最新发布
11-15
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值