現在PHP簡單地傾倒在頁面上是這樣的:是否有可能讓PHP錯誤看起來更好?可以在單獨的行上堆疊跟蹤輸出?
Fatal error: Cannot redeclare Cms\getItemHierarchy() (previously declared in /home/cartman/Development/cmsdev/engine_1.0/Cms/Menu.php:62) in /home/cartman/Development/cmsdev/engine_1.0/Cms/Menu.php on line 62 Call Stack: 0,0001 634424 1. {main}() /home/cartman/Development/cmsdev/public_normal/index.php:0 0,0037 757768 2. Bootstrap::run() /home/cartman/Development/cmsdev/public_normal/index.php:7 0,0037 757768 3. Cms\Front->dispatch() /home/cartman/Development/cmsdev/data_production/bootstrap.php:94 0,0043 781512 4. frontendController->contactusAction() /home/cartman/Development/cmsdev/engine_1.0/Cms/Front.php:367 0,0051 817152 5. plugins\m3nu\api->renderMenu($configName = 'bottom', $activeItem = 'contactme') /home/cartman/Development/cmsdev/data_production/controllers/frontendController.php:43 0,0052 825392 6. Cms\Menu->generateMenu() /home/cartman/Development/cmsdev/public_normal/plugins/m3nu/api.php:29 0,0052 825392 7. Cms\Menu->preParseConfig() /home/cartman/Development/cmsdev/engine_1.0/Cms/Menu.php:121
有沒有一種方法,使輸出顯得更加有組織的,至少打印堆棧跟蹤在不同的行?
是的。我已將它設置爲2,但輸出仍在一行上。 – Stann
哦 - 我還必須在php.ini中爲xdebug設置html_errors = On以使用漂亮的橙色格式。適用於我。 – Stann