亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Home PHP Framework ThinkPHP What should I do if I get an error when deploying thinkphp5 in Pagoda?

What should I do if I get an error when deploying thinkphp5 in Pagoda?

Dec 19, 2022 am 11:04 AM
pagoda panel thinkphp5

寶塔部署thinkphp5報錯的解決辦法:1、打開寶塔服務(wù)器,安裝php pathinfo擴展并啟用;2、配置“.access”文件,內(nèi)容為“RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]”;3、在網(wǎng)站管理里面,啟用thinkphp的偽靜態(tài)即可。

What should I do if I get an error when deploying thinkphp5 in Pagoda?

本教程操作環(huán)境:Windows10系統(tǒng)、thinkphp5版、Dell G3電腦。

寶塔部署thinkphp5報錯怎么辦?

寶塔服務(wù)器面板 部署 thinkphp5 坑

thinkphp5 在寶塔服務(wù)器上部署,出現(xiàn)的問題:

?

1. File not found.

  原因: 寶塔服務(wù)器默認不支持 pathinfo 的路徑訪問;需要在軟件 - PHP - 管理里面,安裝php pathinfo 擴展,并啟用;

? ? ? ? ? ? ? ? ? ?thinkphp 在入口文件同級下,有個 .access 文件,需要配置;官方文檔中有說明,但是有個地方是不正確的

? ? ? ? ? ? ? ? ? ?正確的配置應(yīng)該如下:

? ? ? ? ? ? ? ? ? ? ?

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>

? ?特別注意? ?index.php?s=

這個問題搞了2天,糾結(jié)了好久。無意中嘗試發(fā)現(xiàn)是路徑的問題。太坑。

2.網(wǎng)站管理里面,需要啟用 thinkphp 的偽靜態(tài)。

?

完成上面2步,基本上能解決路徑不對的問題。? ?

?

路徑不對,主要還是thinkphp的路由問題,可能版本不一樣,都會有所區(qū)別。需要具體視情況來分析了。

推薦學(xué)習(xí):《PHP視頻教程》《thinkPHP視頻教程

The above is the detailed content of What should I do if I get an error when deploying thinkphp5 in Pagoda?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1488
72
A brief analysis of the problem that the server cannot be remote after installing Pagoda A brief analysis of the problem that the server cannot be remote after installing Pagoda Nov 23, 2022 pm 04:56 PM

This article uses the Pagoda Panel Tutorial column to introduce to you the problem that server2022 cannot be remote after installing Pagoda. I wonder if you have encountered such a problem? Let me show you how I handle it!

How to configure UFW firewall through Pagoda panel How to configure UFW firewall through Pagoda panel Jun 21, 2023 am 09:08 AM

Configuring a firewall on a Linux server is very important, as it can effectively protect the server from malicious attacks. On the Ubuntu operating system, we can use UFW firewall to protect the security of the server. In this article, we will introduce how to configure UFW firewall using Pagoda panel. Step 1: Install Pagoda Panel First, we need to install Pagoda Panel on Ubuntu. You can download the installation package of Pagoda Panel for free from the Pagoda official website, and then run the following command in the command line to install Pagoda Panel: $wget

How to set the speed limit of the virtual host through the Pagoda panel How to set the speed limit of the virtual host through the Pagoda panel Jun 21, 2023 am 11:17 AM

Pagoda Panel is a very excellent server management panel under Linux system. It has powerful functions and friendly interface, which can help users manage servers easily. In the process of using the Pagoda Panel, it is sometimes necessary to limit the speed of the virtual host to ensure the stability and fluency of the server. This article will introduce how to set the speed limit of the virtual host through the Pagoda panel to achieve a good user experience. 1. Overview of Speed ??Limit Speed ??limit refers to limiting the host bandwidth and ensuring the normal operation of the server by controlling the host traffic. exist

How to use the Pagoda panel to set up domain name resolution How to use the Pagoda panel to set up domain name resolution Jun 21, 2023 am 09:19 AM

With the development and popularization of the Internet, domain names have become an indispensable part of our online world. However, many people are still confused about the settings of domain name resolution. Today, we will introduce how to use the Pagoda panel to set up domain name resolution. What is DNS? Domain name resolution is the process of binding a domain name to the IP address of the website or server it represents. It is a process that converts human-readable domain names into computer-readable IP addresses. The main components of domain name resolution are: domain name registration, DNS resolution and we

Introduction to the WebDAV file management function of Pagoda Panel Introduction to the WebDAV file management function of Pagoda Panel Jun 21, 2023 am 11:33 AM

Introduction to the WebDAV file management function of Pagoda Panel WebDAV is a file management technology based on the HTTP protocol. It allows users to access files on the network through the HTTP protocol and manage these files. With the support of WebDAV technology, we can build a Web server to provide various network services. Pagoda Panel is a popular web server management tool that provides a wealth of functional modules, among which the WebDAV file management function is one of them. Below, this article

What should I do if I get an error when deploying thinkphp5 in Pagoda? What should I do if I get an error when deploying thinkphp5 in Pagoda? Dec 19, 2022 am 11:04 AM

Solution to the error reported when deploying thinkphp5 in Pagoda: 1. Open the Pagoda server, install the php pathinfo extension and enable it; 2. Configure the ".access" file with the content "RewriteRule ^(.*)$ index.php?s=/$1 [QSA ,PT,L]”; 3. In website management, just enable thinkphp’s pseudo-static.

How to use Pagoda Panel for reverse proxy cache configuration How to use Pagoda Panel for reverse proxy cache configuration Jun 21, 2023 pm 01:06 PM

With the continuous development of the Internet, the number of visits to the website is increasing, which also puts forward higher requirements for the performance of the website. Reverse proxy caching can improve the access speed of the website, reduce the load on the server, and provide users with a better access experience. This article will introduce how to use the Pagoda panel for reverse proxy cache configuration. 1. What is reverse proxy cache? Reverse proxy cache refers to adding a reverse proxy server between the server and the client. When the client initiates a request to the server, the request is not sent directly to the server, but is first sent to the reverse proxy server. To the agent

How to use Pagoda Panel for MySQL management How to use Pagoda Panel for MySQL management Jun 21, 2023 am 09:44 AM

Pagoda Panel is a powerful panel software that can help us quickly deploy, manage and monitor servers, especially small businesses or individual users who often need to build websites, database management and server maintenance. Among these tasks, MySQL database management is an important job in many cases. So how to use the Pagoda panel for MySQL management? Next, we will introduce it step by step. Step 1: Install Pagoda Panel. Before starting to use Pagoda Panel for MySQL management, you first need to install Pagoda Panel.

See all articles