我是Magento和Zend框架的新手。以下是Mage_Customer_AccountController中的两个示例:
127行
public function loginPostAction(){
if ($this->_getSession()->isLoggedIn()) {
$this->_redirect('*/*/');
return;
}和第230行
public function createAction()
{
if ($this->_getSession()->isLoggedIn()) {
$this->_redirect('*/*');
return;
}这两个_redirect()会有什么不同呢?
发布于 2011-01-05 19:03:18
这两行是相等的,因为Magento在内部将url路径修改为带有"/“结尾的规范视图。
之所以写一次'*/*/‘,写其他时间'*/*’,是因为Magento开发人员缺乏描述这类情况的风格指南。你可以使用你喜欢的任何形式。
https://stackoverflow.com/questions/4601218
复制相似问题