Hidden entry files in TP5

不言
Release: 2023-03-25 16:06:01
Original
4188 people have browsed it

这篇文章主要介绍了关于TP5中隐藏入口文件,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下

使用phpstudy时
tp5中的官方说明是在入口文件的同级目录下添加一个.htaccess文件
文件内容:

 Options +FollowSymlinks -Multiviews RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] 
Copy after login

这个配置在phpstudy下并没有效果
在phpstudy下.htaccess文件里面的内容应该改成:

 Options +FollowSymlinks -Multiviews RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] 
Copy after login

相关推荐:

tp5中phpexcel生成表格实例分享


The above is the detailed content of Hidden entry files in TP5. 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