php 获取 post 请求体参数
1 private function getPostData() { 2 $postdata = file_get_contents("php://input"); 3 $data = urldecode($postdata); 4 $data = substr_replace($data, '', 0, 5); 5 $data = str_replace(PHP_EOL, '', $data); 6 //var_dump($data); 7 //$data = json_decode($data, true); 8 //var_dump($data); 9 return $data; 10 }
我就是我,颜色不一样的烟火 --- geloutingyu