Home > PHP Framework > ThinkPHP > body text

THINKPHP public What to do if something goes wrong

藏色散人
Release: 2022-12-09 09:28:31
Original
1228 people have browsed it

THINKPHP public出错的解决办法:1、找到并打开public目录下的“.htaccess”文件;2、直接替换内容为“RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f”即可。

THINKPHP public What to do if something goes wrong

本教程操作环境:Windows7系统、ThinkPHP5版、Dell G3电脑。

THINKPHP public 出错怎么办?

解决thinkphp将public作为根目录报错问题

打开public下的.htaccess:

THINKPHP public What to do if something goes wrong

直接替换一下内容,这样应该就能解决了

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
Copy after login

推荐学习:《thinkPHP视频教程

The above is the detailed content of THINKPHP public What to do if something goes wrong. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!