当我在zf3上更改不同mudule的布局时,会出现错误。
致命错误:未捕获的Zend \ Router \ Exception \ RuntimeException:在/mnt/shared/zf3.local/vendor/zendframework/zend-router/src/Http/TreeRouteStack.php:354堆栈中找不到名称为“的路由” trace:#0 /mnt/shared/zf3.local/vendor/zendframework/zend-view/src/Helper/Url.php(106):Zend \ Router \ Http \ TreeRouteStack->汇编(数组,数组)#1 [内部函数]:Zend \ View \ Helper \ Url-> __ invoke('/ passport')#2 /mnt/shared/zf3.local/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(397 ):call_user_func_array(Object(Zend \ View \ Helper \ Url),Array)#3 /mnt/shared/zf3.local/module/Passport/view/layout/layout.phtml(42):Zend \ View \ Renderer \ PhpRenderer - > __ call('url',Array)#4 /mnt/shared/zf3.local/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(505):include('/ mnt / shared / zf3 ...')#5 /mnt/shared/zf3.local/vendor/zendframework/zend-view/src/View.php(207):Zend \ View \ Renderer \ PhpRenderer-> render()#6 / mnt /shared/zf3.local/vendor/zendframework/zend-mvc/src/View/Http/Default RenderingStrategy.php(105):Zend \ View \ View-> render(第354行/mnt/shared/zf3.local/vendor/zendframework/zend-router/src/Http/TreeRouteStack.php中的O
我不知道要解决这个问题。
我使用了教程: How to set different layouts for different modules in Zend Framework 3