thinkphp 去掉URL 里面的index.php(?s=),thinkphpindex.php
Jun 13, 2016 am 09:28 AMthinkphp 去掉URL 里面的index.php(?s=),thinkphpindex.php
例如你的原路徑是 http://localhost/test/index.php/home/goods/index.html 那么現(xiàn)在的地址是 http://localhost/test/home/goods/index.html 如何去掉index.php呢?
1.httpd.conf配置文件中加載了mod_rewrite.so模塊? //在APACHE里面去配置 #LoadModule rewrite_module modules/mod_rewrite.so把前面的警號去掉
2.AllowOverride None 講None改為 All????? //在APACHE里面去配置 (注意其他地方的AllowOverride也統(tǒng)統(tǒng)設(shè)置為ALL)
3.確保 config.php??里面配置項 URL_MODEL 設(shè)置為 2? return Array( ?? 'URL_MODEL' => '2', );
4 .htaccess文件必須放到項目跟目錄下 這個文件里面加:
項目下面建個.htaccess文件,.htaccess就是文件名,前面有個小點,內(nèi)容為
.htaccess文件代碼
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
?
deny from all
Redirect permanent /index.php /
order deny,allow
或參考ThinkPHP3.0完全開發(fā)手冊 16.2 隱藏index.php
?

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??? urllib3 ?????? ?? ??? NameResolutionError(self.host,self,e)frome???. ? ??? ??? DNS ??? ???? ?????. ??? ?? ? ????. ?? ??? URL ??? ???? ??? DNS ??? ????? ??? ? ?? ??? ??? ? ????. ? ??? ???? ?? ? ??? ???? ??? ?? ??? ????. ??? URL ??? ???? ???? ???? ? ??? ??????. DNS ??? ??? ? ??? ??????. ????? "ping" ??? ??? ? ? ????. DNS ??? ??? ? ??? ?????? ??? ?? ?? ?? ??? ?? ?? IP ??? ???? ????? ???? ???.

ThinkPHP ????? ????? ??? ?????: Composer? ????, ???? ????? ???? php bin/console? ????, ?? ???? ??? http://localhost:8000? ?????.

ThinkPHP?? ??? PHP ????? ??? ?? ??? ????. ??? ???? 3.2, 5.0, 5.1, 6.0? ????, ??? ??? ??? ???? ??? ??? ???? ? ?????. ?? ?? ??? ThinkPHP 6.0.16???. ??? ??? ? PHP ??, ?? ?? ?? ? ???? ??? ??????. ??? ??? ??? ???? ?? ?? ??? ???? ?? ????.

ThinkPHP Framework? ???? ???? ??: ThinkPHP Framework? ?? ????? ?????? ??? ???. ThinkPHP ?? ????? ???? ?? ???(?? ??)? ????. ?????? ?? ????? ?????. ? ??? ?????. ThinkPHP ??????? ??????. ThinkPHP ?????? URL? ???? ?????.

???: 1. ??? ????. url? ??? ??? ?? ????? html? ?????? ??? ?????. 2. html?? ?? ?? URL? ?? ? ??? ??? url?? ? ??? html ???? ??? ? ????. ? ????? url? ? ??? ??? ?????.

Laravel? ThinkPHP ?????? ?? ??: ThinkPHP? ????? ??? ? ??? ??? ?? Laravel?? ??? ????. Laravel? ? ????? ??? ??????? ?? ThinkPHP? ? ??? ? ????.

ThinkPHP ?? ??: PHP, Composer ? MySQL ??? ?????. Composer? ???? ????? ????. ThinkPHP ?????? ???? ?????. ?????? ??? ?????. ?????? ??? ?????. ??????? ???? http://localhost:8000? ?????.

ThinkPHP? ?? ????, ?? ???, ?? ?? ? ?????? ???? ?? ??? ?? ??? PHP ????????. ?? ?? ???? ??? ?? 10,000? ??? ??? ??? ? ??? JD.com, Ctrip? ?? ??? ? ??? ? ?????? ????? ?? ?? ?????? ?? ?????.
