Home  >  Article  >  PHP Framework  >  THINKPHP public What to do if something goes wrong

THINKPHP public What to do if something goes wrong

藏色散人
藏色散人Original
2022-12-09 09:28:311233browse

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>

推荐学习:《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!

Statement:
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