zpf 获取表单等数据的用法

2015年4月12日 12:25:35 星期日

zpf框架中获取表单数据的方法

 1     //获得get,post,url中的数据
 2     private function setData()
 3     {
 4         $this->data = array_merge($_COOKIE, $_GET, $_POST, $this->route->args);
 5         $this->ispost = count($_POST);
 6     }
 7 
 8     //获取请求数据
 9     public function getData($name, $safe=1)
10     {
11         if (!$safe) {
12             return isset($this->data[$name]) ? Safe::check($this->data[$name]) : NULL;
13         } else {
14             return isset($this->data[$name]) ? $this->data[$name] : NULL;
15         }
16     }
原文地址:https://www.cnblogs.com/iLoveMyD/p/4419309.html