本文总结了zend framework重定向的方法。分享给大家供大家参考,具体如下:
一. render
不指定render
结果: {当前Module}/{当前Controller}/{当前Action}.phtml
$this->render('bar');
结果: {当前Module}/{当前Controller}/bar.phtml
二. forward
$this->_forward('bar');
结果: {当前Module}/{当前Controller}/bar
$this->_forward('bar', 'foo');
结果: {当前Module}/foo/bar
$this->_forward('bar', 'foo', 'hoge');
结果: hoge/foo/bar
$params = array(
'a' => '1',
'b' => '2'
);
$this->_forward('bar', 'foo', 'hoge', $params);
结果: /hoge/foo/bar/a/1/b/2
三. redirect
$this->_redirect('/hoge');
结果: /hoge
$this->_redirect('/hoge/foo');
结果: /hoge/foo
$this->_redirect('/hoge/foo/bar');
结果: /hoge/foo/bar
$this->_redirect('http://localhost/hoge/foo/bar');
结果: http://localhost/hoge/foo/bar
$this->_redirect('http://localhost/hoge/foo/bar"htmlcode">
$this->_helper->layout()->disableLayout();
不使用 view
结果:
$this->_helper->viewRenderer->setNoRender();
更多关于zend相关内容感兴趣的读者可查看本站专题:《Zend FrameWork框架入门教程》、《php优秀开发框架总结》、《Yii框架入门及常用技巧总结》、《ThinkPHP入门教程》、《php面向对象程序设计入门教程》、《php+mysql数据库操作入门教程》及《php常见数据库操作技巧汇总》
希望本文所述对大家基于Zend Framework框架的PHP程序设计有所帮助。
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。