自然 发表于 2013-9-6 16:59:04

CI 如何在已经静态的页面使用post


CI 如何在已经静态的页面使用post,前提是开启了 $config['csrf_protection'] = TRUE;

// If it's not a POST request we will set the CSRF cookie
                if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST'))
                {
                        return $this->csrf_set_cookie();
                }

静态页面提交post 进来$_SERVER['REQUEST_METHOD']直接是post所以没有给$this->csrf_set_cookie() 初始化的机会。
我测试进csrf_verify() 就初始化csrf_set_cookie但是还是不行,求解!!!!!!

自然 发表于 2013-9-6 17:06:10

....已解决   太粗心了.{:soso_e138:}
页: [1]
查看完整版本: CI 如何在已经静态的页面使用post