尊龙凯时人生就是博

thinkphp·Óɲ»×ª»»ÎÊÌâÔõÑù½â¾ö

Ò»¡¢ÎÊÌâÐÎò

ÔÚÎÒÃÇʹÓÃThinkPHP¾ÙÐпª·¢Ê±£¬ÓÐʱ»áÓöµ½ÕâÑùµÄÇéÐΣºµ±ÎÒÃǾÙÐÐһЩ·ÓɲÙ×÷ʱ£¬Ò³Ã沢δÌøתÖÁÎÒÃÇËùÆÚÍûµÄ½çÃæ¡£

ÀýÈ磬ÎÒÃÇÏ£Íûͨ¹ýURL¡°www.example.com/home/do¡±À´»á¼û¡°HomeController.php¡±Öеġ°do¡±ÒªÁ죬µ«ÎÒÃÇÏÖʵÉÏÈ´ÎÞ·¨»á¼ûµ½´ËÒªÁ졣ͬʱ£¬ÎÒÃÇ·¢Ã÷²¢Ã»Óб¨´íÐÅÏ¢·ºÆð£¬Õâ¾ÍÈÃÎÒÃÇÎÞ´ÓÏÂÊÖ¡£

¶þ¡¢Ôµ¹ÊÔ­ÓÉÆÊÎö

Á¬Ã¦Ñ§Ï°¡°PHPÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡± £»

ÔÚThinkPHPÖУ¬Â·ÓÉÊÇͨ¹ýURLºó׺¾ÙÐÐÆ¥ÅäµÄ¡£ÈôÊÇÔÚÎÒÃǵÄURLÖÐûÓÐʹÓÃÈκκó׺£¬ÄÇôThinkPHP½«ÒÔΪÎÒÃÇÒª»á¼ûµÄÒªÁìÊÇ¿ØÖÆÆ÷ÖеÄĬÈÏÒªÁ죨ĬÈÏÒªÁìÃûÒ»Ñùƽ³£Îª¡°index¡±£©¡£

ÀýÈ磬ÎÒÃÇʹÓÃURL¡°www.example.com/home/index¡±Ê±£¬¾Í»áĬÈÏ»á¼û¡°HomeController.php¡±Öеġ°index¡±ÒªÁì¡£

¶øµ±ÎÒÃÇʹÓÃURL¡°www.example.com/home/do¡±Ê±£¬ÓÉÓÚûÓÐʹÓÃÈκκó׺£¬ThinkPHP¾Í»áÒÔΪÎÒÃÇÒª»á¼ûµÄÊÇ¡°index¡±ÒªÁ죬ͬʱÓÉÓÚ¡°do¡±ÒªÁì²¢²»±£´æÓÚ¿ØÖÆÆ÷ÖУ¬ÒÔÊǾͻᵼÖÂÒ³Ãæ»á¼ûʧ°Ü¡£

Èý¡¢½â¾öÒªÁì

1.ʹÓá°/¡±ºó׺

ÈôÊÇÔÚURLĩβÌí¼Óб¸Ü¡°/¡±£¬¾Í¿ÉÒÔ×èÖ¹·ºÆð·Óɲ»Æ¥ÅäµÄÇéÐΡ£ÀýÈ磬ÎÒÃÇ¿ÉÒÔʹÓÃURL¡°www.example.com/home/do/¡±À´»á¼û¡°HomeController.php¡±Öеġ°do¡±ÒªÁì¡£

ͬʱ£¬ÎÒÃÇÔÚʹÓÃThinkPHP¾ÙÐпª·¢Ê±£¬ÍƼöÔÚÉèÖÃÎļþconfig.phpÖн«URLºó׺ÉèÖÃΪ¡°/¡±£¬ÕâÑù¿ÉÒÔ×èÖ¹·ºÆð·Óɲ»×ª»»µÄÎÊÌâ¡£

2.Ð޸ķÓɹæÔò

ÎÒÃÇÒ²¿ÉÒÔͨ¹ýÐ޸ķÓɹæÔòÀ´½â¾öÎÊÌâ¡£

Ê×ÏÈ£¬ÔÚÎÒÃǵÄ·ÓÉÉèÖÃÎļþÖУ¨Ò»Ñùƽ³£Îªroute.php£©£¬ÎÒÃÇ¿ÉÒÔ½«Â·ÓɹæÔò½ç˵Ϊ£º

return [
    'home/do/[:id]' => 'home/[:action]',
];

µÇ¼ºó¸´ÖÆ

ÕâÑù£¬ÎÒÃǾͿÉÒÔͨ¹ýURL¡°www.example.com/home/do/1¡±À´»á¼û¡°HomeController.php¡±Öеġ°do¡±ÒªÁ죬²¢ÔÚURLÖÐת´ïÒ»¸öid²ÎÊý¡£

ÒÔÉϾÍÊÇthinkphp·Óɲ»×ª»»ÎÊÌâÔõÑù½â¾öµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ