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:
立即学习“PHP免费学习笔记(深入)”;
直接替换一下内容,这样应该就能解决了
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] </IfModule>
推荐学习:《thinkPHP视频教程》
以上就是THINKPHP public 出错怎么办的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号