国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

訪問?路徑http://tp6.com/index.php/index/index/admin
塵世*????
塵世*???? 2020-05-19 17:35:58
0
2
2998

為什么我的按照老師的放到index文件下訪問的時(shí)候路徑變成這樣才能訪問?

http://tp6.com/index.php/index/index/admin

塵世*????
塵世*????

全部回復(fù)(1)
!

這里說的入口文件指的是公共/ index.php文件,配置文件就在這個(gè)目錄下可以去掉URL地址里面的入口文件index.php,但是需要額外配置WEB服務(wù)器的重寫規(guī)則。以Apache為例,在需要文件入口的同級(jí)添加.htaccess文件(官方默認(rèn)自帶了該文件),內(nèi)容如下:

<IfModule?mod_rewrite.c>
Options?+FollowSymlinks?-Multiviews
RewriteEngine?on
RewriteCond?%{REQUEST_FILENAME}?!-d
RewriteCond?%{REQUEST_FILENAME}?!-f
RewriteRule?^(.*)$?index.php/?[QSA,PT,L]
</IfModule>
如果用的phpstudy,規(guī)則如下:
<IfModule?mod_rewrite.c>
?Options?+FollowSymlinks?-Multiviews
?RewriteEngine?on?RewriteCond?%{REQUEST_FILENAME}?!-d
?RewriteCond?%{REQUEST_FILENAME}?!-f
?RewriteRule?^(.*)$?index.php?[L,E=PATH_INFO:]?
?</IfModule>

  • 回復(fù) 你好,謝謝你的回答,那個(gè)問題已經(jīng)解決了,但是現(xiàn)在只能訪問index方法,不能訪問里面的hello方法,控制器不存在:app\index\controller\Hello :
    塵世*???? 作者 2020-05-20 12:36:54
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板