Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/289.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Zend Framework 1中的布局_Php_Zend Framework_Layout - Fatal编程技术网

Php Zend Framework 1中的布局

Php Zend Framework 1中的布局,php,zend-framework,layout,Php,Zend Framework,Layout,我正在尝试在ZF1中创建布局 application.ini resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" resources.layout.layout = "default" Bootstrap.php protected function _initView() { $this->bootstrap('layout'); $layout = $this->getResou

我正在尝试在ZF1中创建布局

application.ini

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.layout.layout = "default"
Bootstrap.php

protected function _initView() 
{ 
   $this->bootstrap('layout'); 
   $layout = $this->getResource('layout'); 
   $view = $layout->getView(); 
   $view->headTitle('default title');
   return $view; 
}
我有两个模块home和test,默认布局在home中工作,但在test中不工作。这两个模块都是相等的,只是为了学习ZF1 我应该做些不同的事情来设置我所有模块的默认布局吗

以防你需要它。这是modules/test/IndexController.php的代码

<?php

class Test_IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {

    }

}

如果你需要更多信息,请告诉我。谢谢

这不是布局问题。在视图中是一个代码问题

Hello, this is the test module