×ðÁú¿­Ê±

thinkphpÍøÒ³ÏÔʾ²ÎÊý¹ýʧ

ÔÚʹÓÃthinkphp¾ÙÐпª·¢Ê±£¬¾­³£»á·ºÆðÍøÒ³ÏÔʾ²ÎÊý¹ýʧµÄÇéÐΣ¬ÌØÊâÊÇÔÚʹÓÃ±íµ¥´«²Îʱ¸üΪ³£¼û¡£ÕâÖÖÇéÐλá¸øÓû§´øÀ´Î´±ã£¬ÑÏÖØÓ°ÏìÍøÕ¾ÌåÑé¡£±¾ÎĽ«ÏÈÈÝÔÚthinkphp¿ò¼ÜÏÂÔõÑù½â¾öÍøÒ³ÏÔʾ²ÎÊý¹ýʧµÄÎÊÌâ¡£

Ò»¡¢Ôµ¹ÊÔ­ÓÉÆÊÎö

ÍøÒ³ÏÔʾ²ÎÊý¹ýʧµÄÔµ¹ÊÔ­ÓÉͨ³£ÓÐÁ½ÖÖ£º

1.²ÎÊýδת´ï»òת´ï²»×¼È·£ºÔÚʹÓÃ±íµ¥Ìá½»Êý¾Ýʱ£¬ÎÒÃÇÐèҪͨ¹ý$_POST»ò$_GETÀ´ÎüÊÕ±íµ¥Êý¾Ý£¬ÈôÊÇʹÓÃÀú³ÌÖÐδעÖزÎÊýµÄת´ï£¬»òÕß²ÎÊýת´ïÀú³ÌÖб¬·¢Á˹ýʧ£¬¾Í»áµ¼Ö²ÎÊý²»×¼È·»òδת´ï£¬´Ó¶øµ¼ÖÂÍøÒ³ÏÔʾ²ÎÊý¹ýʧ¡£

2.¿ØÖÆÆ÷»òÒªÁì²»±£´æ£ºÔÚthinkphp¿ò¼ÜÏ£¬ÍøÒ³µÄ»á¼û¶¼ÊÇͨ¹ý¿ØÖÆÆ÷ºÍÒªÁìÀ´ÊµÏֵġ£ÈôÊÇÎÒÃÇ»á¼ûµÄ¿ØÖÆÆ÷»òÒªÁì²»±£´æ£¬ÄÇôҲ»áµ¼ÖÂÍøÒ³ÏÔʾ²ÎÊý¹ýʧ¡£

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

¶þ¡¢½â¾öÒªÁì

1.¼ì²é²ÎÊýת´ï

ÔÚʹÓÃ±íµ¥´«²Îʱ£¬ÐèÒªÊ×Ïȼì²é²ÎÊýÊÇ·ñ׼ȷת´ï¡£ÎÒÃÇ¿ÉÒÔͨ¹ýÔÚ¿ØÖÆÆ÷ÒªÁìÖдòÓ¡²ÎÊýÀ´¼ì²é²ÎÊýÊÇ·ñ±»×¼È·ÎüÊÕ£¬ÈçÏ£º

public function test(){
    $data = $_POST; //ÎüÊÕ±íµ¥Êý¾Ý
    print_r($data); //´òÓ¡±íµ¥Êý¾Ý
}

µÇ¼ºó¸´ÖÆ

ÈôÊÇ±íµ¥Êý¾Ý±»×¼È·ÎüÊÕµ«ÈÔÈ»·ºÆð²ÎÊý¹ýʧ£¬ÔòÐèÒª¼ì²éת´ï²ÎÊýµÄ·½·¨ÊÇ·ñ׼ȷ¡£µ±Ê¹ÓÃGET·½·¨´«²Îʱ£¬ÐèҪעÖزÎÊýµÄת´ïÊÇͨ¹ýurlÀ´ÊµÏֵġ£Òò´ËÐèÒª¼ì²éurlÖеIJÎÊýÊÇ·ñ׼ȷ¡£

2.¼ì²é¿ØÖÆÆ÷ÓëÒªÁì

ÔÚthinkphp¿ò¼ÜÏ£¬µ±ÎÒÃÇ»á¼ûij¸ö¿ØÖÆÆ÷µÄÒªÁìʱ£¬ÐèÒª°ü¹Ü¸Ã¿ØÖÆÆ÷¼°ÒªÁìÒѾ­±£´æ¡£ÈôÊÇ¿ØÖÆÆ÷»òÒªÁì²»±£´æ£¬Ôò»áµ¼ÖÂÍøÒ³ÏÔʾ²ÎÊý¹ýʧ¡£Òò´Ë£¬ÎÒÃÇÐèÒª¼ì²é¿ØÖÆÆ÷¼°ÒªÁìµÄÃû³ÆÊÇ·ñ׼ȷ¡£

3.¼ì²é·ÓÉÉèÖÃ

ÔÚthinkphp¿ò¼ÜÖУ¬Â·Óɹ¦Ð§ÊǺÜÊÇÇ¿Ê¢µÄ¡£µ±ÎÒÃÇʹÓ÷Óɹ¦Ð§Ê±£¬ÐèÒª°ü¹Ü·ÓÉÉèÖõÄ׼ȷÐÔ¡£ÈôÊÇ·ÓÉÉèÖùýʧ£¬Í¬Ñù»áµ¼ÖÂÍøÒ³ÏÔʾ²ÎÊý¹ýʧ¡£ÎÒÃÇ¿ÉÒÔͨ¹ý´òӡ·ÓÉÐÅÏ¢À´¼ì²é·ÓÉÉèÖÃÊÇ·ñ׼ȷ£º

public function test(){
    echo $this->request->controller(); //´òÓ¡Ä¿½ñ¿ØÖÆÆ÷Ãû³Æ
    echo '<br>';
    echo $this->request->action(); //´òÓ¡Ä¿½ñÒªÁìÃû³Æ
    echo '<br>';
    echo $this->request->module(); //´òÓ¡Ä¿½ñÄ£¿éÃû³Æ
}

µÇ¼ºó¸´ÖÆ

ͨ¹ýÒÔÉÏÒªÁ죬ÎÒÃÇ¿ÉÒÔɨ³ý³£¼ûµÄÍøÒ³ÏÔʾ²ÎÊý¹ýʧ£¬ÈôÊÇÈÔÈ»ÎÞ·¨½â¾öÎÊÌ⣬Ôò½¨ÒéÉó²éthinkphpµÄ¹Ù·½Îĵµ»òÕßÌá½»ÎÊÌâÖÁ¹Ù·½ÂÛ̳׷Çó×ÊÖú¡£

ÒÔÉϾÍÊÇthinkphpÍøÒ³ÏÔʾ²ÎÊý¹ýʧµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

18523999891

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

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

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