1.
if($this->_request->isPost()) 只返回 boolean
if(strtolower($_SERVER['REQUEST_METHOD']) == 'post')) 有可能抛出异常
2.
session存储xml对象:转换为一般对象或者数组存放。
The only solution seems to be to copy all
relevant data to a "normal" object or array. Or store any modifications
to the XML source in the XML file.
3.
禁用Layout:
$this->_helper->layout->disableLayout();
渲染不同的Layout:
$this->_helper->layout->setLayout(’layout');
layout: Layout文件名(不包含后缀)
本文介绍了PHP框架中的一些实用技巧,包括如何判断HTTP请求是否为POST类型而不引发异常的方法、如何在Session中存储XML对象以及如何禁用或切换不同的Layout布局。
1969

被折叠的 条评论
为什么被折叠?



