在本地计算机上运行Web应用程序时遇到麻烦。该应用程序在服务器上运行良好,但是当我尝试在本地运行时,收到以下错误消息:
Fatal error: Uncaught TypeError:
Argument 1 passed to Application\Model\AbstractModel::__construct() must be an instance of Zend\Db\Adapter\Adapter, null given, called in
/Applications/MAMP/htdocs/explorers_3/module/Application/view/layout/layout.phtml on line 25 and defined in
/Applications/MAMP/htdocs/explorers_3/module/Application/src/Model/AbstractModel.php:17
Stack trace:
#0 /Applications/MAMP/htdocs/explorers_3/module/Application/view/layout/layout.phtml(25): Application\Model\AbstractModel->__construct(NULL)
#1 /Applications/MAMP/htdocs/explorers_3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(502): include('/Applications/M...')
#2 /Applications/MAMP/htdocs/explorers_3/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(NULL)
#3 /Applications/MAMP/htdocs/explorers_3/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#4 /Applications/MAMP/htdocs/explorers_3/vendor/zendframework/zen in /Applications/MAMP/htdocs/explorers_3/module/Application/src/Model/AbstractModel.php on line 17
任何帮助将不胜感激吗?
谢谢。