Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/sbboke.com/wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php:409) in /www/wwwroot/sbboke.com/wp-content/themes/pacify/content-single.php on line 5

magento $this->getRequest()->isPost()

找到Zend_Controller_Request_HttpisPost()方法

public function isPost()
{
    if ('POST' == $this->getMethod()) {
        return true;
    }

    return false;
}

getMethod()

public function getMethod()
{
    return $this->getServer('REQUEST_METHOD');
}

因此isPost(),不寻找$_POST数组中存在的数据来检测POST请求,它会查看$_SERVER变量REQUEST_METHOD

相关文章

0 0 投票数
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论