Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the method of building a TP6 project?

Shulou Source: shulou.com Published: 2022-06-02 19:51:10 10月04日 Update

This article mainly explains "what is the method of building a TP6 project". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of building a TP6 project?"

Thinkphp6 project building record

Step 1: create a project

Composer create-project topthink/think "Project name"

Step 2: configure database links

Modify the .env file

[DATABASE] TYPE = mysqlHOSTNAME = 127.0.0.1DATABASE = database USERNAME = user PASSWORD = password HOSTPORT = 3306CHARSET = utf8DEBUG = true

Step 3: configure pseudo-static

Apache

Options + FollowSymlinks-MultiviewsRewriteEngine OnRewriteCond% {REQUEST_FILENAME}!-dRewriteCond% {REQUEST_FILENAME}!-fRewriteRule ^ (. *) $index.php?s=$1 [QSA,PT,L] SetEnvIf Authorization "(. *)" HTTP_AUTHORIZATION=$1

Nginx

Location / {if (!-e $request_filename) {rewrite ^ (. *) $/ index.php?s=/$1 last;}} Thank you for your reading. This is the content of "what is the method of building a TP6 project?" after the study of this article, I believe you have a deeper understanding of what the method of building a TP6 project is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Project method learning content data database configuration name password that is ideas situations files articles more users knowledge knowledge points articles follow Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Docker NVidia vpn Linux