Home > Article > PHP Framework > THINKPHP public What to do if something goes wrong
THINKPHP public出错的解决办法:1、找到并打开public目录下的“.htaccess”文件;2、直接替换内容为“RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f”即可。
本教程操作环境:Windows7系统、ThinkPHP5版、Dell G3电脑。
THINKPHP public 出错怎么办?
解决thinkphp将public作为根目录报错问题
打开public下的.htaccess:
直接替换一下内容,这样应该就能解决了
<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!