×ðÁú¿­Ê±¹ÙÍøµÇ¼

laravel 500¹ýʧ ÔõôÏÔʾ¹ýʧÒì³£

laravelÊÇÒ»¿îºÜÊÇÊ¢ÐеÄphp¿ò¼Ü£¬Ëü±»ÆÕ±éÓ¦ÓÃÓÚwebÓ¦ÓóÌÐòµÄ¿ª·¢ÖС£laravel¿ò¼ÜÌṩÁËÒ»ÖÖ¼òÆÓÒ×Óõķ½·¨À´½¨ÉèºÍÖÎÀíwebÓ¦ÓóÌÐò£¬Ê¹µÃphpµÄ¿ª·¢ÊÂÇé±äµÃÔ½·¢¸ßЧ¡¢ÇáËɺÍÓä¿ì¡£È»¶ø£¬Èκοò¼Ü¶¼»á·ºÆðһЩ¹ýʧºÍÒì³££¬ºÍlaravel¿ò¼ÜÒ²²»ÆÆÀý¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚlaravel¿ò¼ÜÖÐÏÔʾ500¹ýʧÒì³£¡£

È·ÈϹýʧ±¨¸æÊÇ·ñÆôÓÃ

Laravel¿ò¼ÜÓиöÌص㣬¾ÍÊÇĬÈÏÇéÐÎÏ»áÒþ²ØËùÓеĹýʧ±¨¸æÐÅÏ¢£¬ÒÔ±£»¤Ó¦ÓóÌÐòµÄÒþ˽ºÍÇå¾²ÐÔ¡£Òò´Ë£¬ÈôÊÇÒªÉó²é500¹ýʧµÄÏêϸÐÅÏ¢£¬ÐèҪȷÈÏÒ»ÏÂLaravel¿ò¼ÜÊÇ·ñÆôÓÃÁ˹ýʧ±¨¸æ¡£·­¿ªÉèÖÃÎļþconfig/app.php£¬ÔÚ¸ÃÎļþÖÐÕÒµ½debugÉèÖÃÏȷ±£ÆäֵΪtrue£¬ÈçÏÂËùʾ£º

 'debug' => env('APP_DEBUG', true),

µÇ¼ºó¸´ÖÆ

ÈôÊǸÃÉèÖÃÏîµÄֵΪfalse£¬ÔòÐèÒª½«Æä¸ÄΪtrue£¬ÌåÏÖ¿ªÆô¹ýʧ±¨¸æ¡£

Éó²é¹ýʧ±¨¸æÈÕÖ¾

ÈôÊÇLaravel¿ò¼ÜÆôÓÃÁ˹ýʧ±¨¸æ£¬µ«Ò³ÃæÉÏÈÔȻûÓÐÏÔʾ¹ýʧÒì³£ÐÅÏ¢£¬ÄÇô¿ÉÒÔÉó²éLaravel¿ò¼ÜµÄ¹ýʧ±¨¸æÈÕÖ¾Îļþstorage/logs/laravel.log¡£¸ÃÈÕÖ¾Îļþ¼Í¼ÁË¿ò¼ÜµÄËùÓйýʧÐÅÏ¢£¬°üÀ¨500¹ýʧÒì³£¡£

¿ÉÒÔ·­¿ª¸ÃÈÕÖ¾Îļþ£¬Éó²é×îеÄÈÕÖ¾ÐÅÏ¢£¬¶¨Î»µ½Ïà¹ØµÄ¹ýʧ±¨¸æÐÅÏ¢¡£ºÃ±È£¬ÈôÊÇÓöµ½ÁË¡°MethodNotAllowedHttpException¡±µÄÒì³£¹ýʧ£¬¿ÉÒÔÔÚÈÕÖ¾ÎļþÖÐËÑË÷Õâ¸öÒªº¦×Ö£¬²éÕÒ¸ÃÒì³£µÄÏêϸÐÅÏ¢¡£

[2021-10-01 14:27:59] local.ERROR: MethodNotAllowedHttpException in file /var/www/html/laravel-app/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php on line 255 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException(code: 0):...

µÇ¼ºó¸´ÖÆ

ÏÔʾ¹ýʧµ÷ÊÔÒ³Ãæ

ÈôÊÇÒÔÉÏÒªÁ춼ÎÞ·¨½â¾öÎÊÌ⣬¿ÉÒÔÔÚLaravel¿ò¼ÜÖÐÏÔʾ¹ýʧµ÷ÊÔÒ³Ã棬»ñÈ¡¸ü¶àµÄ¹ýʧÐÅÏ¢¡£Ïêϸ²Ù×÷ÈçÏ£º

¿ªÆôlaravel-debugbar£¨×°ÖÃdebugbar£ºcomposer require barryvdh/laravel-debugbar –dev£¬È»ºóÔÚconfig/app.phpÖÐÌí¼ÓServiceProvider£©£º

'providers' => [

    IlluminateValidationValidationServiceProvider::class,

    IlluminateViewViewServiceProvider::class,

    //Ìí¼Óµ÷ÊÔÃæ°åЧÀÍÌṩÕßÀà

    BarryvdhDebugbarServiceProvider::class,

],

µÇ¼ºó¸´ÖÆ

ÔÚ.envÎļþÖÐÉèÖÃAPP_DEBUG=true¡£

ÔÚapp/Exceptions/Handler.phpµÄreportÒªÁìÖÐÌí¼Ó£º

if ($this->shouldReport($exception)) {

    //¿ªÆôµ÷ÊÔÃæ°å

    app('debugbar')->enable();

}

µÇ¼ºó¸´ÖÆ

È»ºó»á¼ûÓ¦ÓóÌÐò£¬¾ÍÄÜ¿´µ½ÏêϸµÄ¹ýʧÐÅÏ¢Ò³ÃæÁË¡£ÈôÊÇʹÓõÄÊÇÍâµØ¿ª·¢ÇéÐΣ¬¹ýʧÐÅÏ¢Ò³Ã潫»á°üÀ¨ËùÓеĵ÷ÊÔÐÅÏ¢£¬°üÀ¨¿ÍÕ»¸ú×Ù¡¢ÇëÇóºÍÏìÓ¦ÐÅÏ¢¡¢SQLÅÌÎÊÈÕÖ¾µÈ¡£

×ܽá

ÔÚ¿ª·¢WebÓ¦ÓóÌÐòµÄÀú³ÌÖУ¬500¹ýʧÊÇÒ»ÖÖ³£¼ûµÄÒì³££¬µ«ÔÚLaravel¿ò¼ÜÖн«ÆäÕï¶Ï²¢ÐÞ¸´È´²¢²»ÄÑÌ⡣ͨ¹ý±¾ÎÄÌṩµÄÒªÁ죬¿ÉÒÔʵÑé·­¿ª¹ýʧ±¨¸æ¡¢Éó²é¹ýʧÈÕÖ¾ºÍ¿ªÆô¹ýʧµ÷ÊÔÒ³ÃæµÈ·½·¨À´¶¨Î»ºÍÐÞ¸´ÎÊÌâ¡£ËäÈ»£¬Ò»µ©ÎÊÌâ»ñµÃ½â¾ö£¬Ò²Ó¦¸Ã½«¹ýʧ±¨¸æ¹Ø±Õ£¬ÒÔ°ü¹ÜÓ¦ÓóÌÐòµÄÇå¾²ÐÔºÍÒþ˽ÐÔ¡£

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

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ