Skip to content

Instantly share code, notes, and snippets.

@libo1106
Last active August 29, 2015 13:57
Show Gist options
  • Save libo1106/9778670 to your computer and use it in GitHub Desktop.
Save libo1106/9778670 to your computer and use it in GitHub Desktop.
$HTTP_RAW_POST_DATA
<?php
$array_temp = explode( '&', $HTTP_RAW_POST_DATA);
$array_post = [];
if(isset($_REQUEST['mood'])){
$mood = $_REQUEST['mood'];
}else{
// 构造原始POST数组
foreach($array_temp as $val){
$arr = explode('=', $val);
$key = $arr[0];
$val = $arr[1];
$array_post[$key] = $val;
}
$mood = $array_post['mood'];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment