当前位置:网站首页>Phpstudy installs Thinkphp6 (problem + solution)
Phpstudy installs Thinkphp6 (problem + solution)
2022-08-02 03:54:00 【stealth rookie】
One. Installation
Install composer in the software management interface
(I installed version 1.8.5 because the installation of 2.3.3 failed. If I can install 2.3.3, I will install 2.3.3. Because of the error reported later, I still upgraded compose)
Create a website
will generate the following in this folder(The following content needs to be removed first, and then put back after the installation is complete)
Find composer in the management, select the compose version and the php version, PHP >= 7.1.0
Enter cd ../ to return to the previous level
Then composer create-project topthink/think thinkphp
(thinkphp is the domain name of the website created by myself)
Result server composer update reported error: Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
1. The reason is that the composer version is too old
2. The solution: enter the command composer self-update
Then type cd ../ again
and composer create-project topthink/think thinkphp
The reason for the error is that the thinkphp folder is not empty, so it was mentioned earlier that the contents of the folder should be moved out
After moving out, enter composer create-project topthink/think thinkphp, and then there is no problem!!!
Domain/public
The test installation is complete (remember to move the files that were moved out and move them back!!!)
Update Thinkphp6 core (I didn't update it)
composer update topthink/framework
Note: The directory where the installation and update commands are located is different, and the update must be executed under your application root directory
2. After the installation is successful, the directory structure
- The main change in the directory structure of version 6.0 is that the core framework is included in the
vendor
directory, and then the originalapplication
directory becomes theapp
directory. - The directory structure after installation is a single application mode
- In the
mac
orlinux
environment, note that you need to set theruntime
directory permission to 777
www WEB deployment directory (or subdirectory)├─app application directory│ ├─controller Controller directory│ ├─model Model catalog│ ├─ ... more class library directories│ ││ ├─common.php public function file│ └─event.php event definition file│├─config configuration directory│ ├─app.php Application configuration│ ├─cache.php cache configuration│ ├─console.php console configuration│ ├─cookie.php Cookie configuration│ ├─database.php database configuration│ ├─filesystem.php file disk configuration│ ├─lang.php Multilingual configuration│ ├─log.php log configuration│ ├─middleware.php middleware configuration│ ├─route.php URL and routing configuration│ ├─session.php Session configuration│ ├─trace.php Trace configuration│ └─view.php view configuration│├─view view directory├─route route definition directory│ ├─route.php route definition file│ └─ ...│├─public WEB directory (external access directory)│ ├─index.php entry file│ ├─router.php quick test file│ └─.htaccess for apache rewriting│├─extend extension class library directory├─The runtime directory of the runtime application (writable, customizable)├─vendor Composer class library directory├─.example.env environment variable example file├─composer.json composer definition file├─LICENSE.txt authorization description file├─README.md README file├─think command line entry file
边栏推荐
猜你喜欢
随机推荐
如何根据地图上的两个坐标点来确定方向
(2)Thinkphp6模板引擎**标签
SQL:DDL、DML、DQL、DCL相应介绍以及演示
PHP8.2 version release administrator and release plan
PHP 发起支付宝支付时 订单信息乱码解决
js scope and closure
解决uni-app 打包H5网站 下载图片问题
ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach
IO流、字节流、字节缓冲流
(3)Thinkphp6数据库
面试总结 22/7/22 面试中的重点
IO流、 编码表、 字符流、 字符缓冲流
微信小程序全局组件的定义
npm and package.json
6.27面试集
SQL classification, DQL (Data Query Language), and corresponding SQL query statement demonstration
1.8今日学习
多线程(实现多线程、线程同步、生产者消费者)
[vite] Failed to parse source for import analysis because the content contains invalid JS syntax.
解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址