| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 | | <?php |  |   |  | class MyRequest extend PhalApi_Request{ |  |   public function __construct($data = NULL) { |  |       parent::__construct($data); |  |   |  |       // json处理 |  |       $this->post = json_decode(file_get_contents('php://input'), TRUE);     |  | print_r($this->post); |  |       // 普通xml处理 |  |       //$this->post = simplexml_load_string ( |  |       //    file_get_contents('php://input'), |  |       //    'SimpleXMLElement', |  |       //    LIBXML_NOCDATA |  |       //); |  |       //$this->post = json_decode(json_encode($this->post), TRUE); |  |   }   |  | }     | 
 |