首先要記得設定 php.ini
開啟php.ini,搜尋
;always_populate_raw_post_data = On
然後把前面的;拿掉變成
always_populate_raw_post_data = On
存檔 重啟server
AS3的部分
PHP的部分
<?
if (isset($GLOBALS["HTTP_RAW_POST_DATA"])) {
$xml = $GLOBALS["HTTP_RAW_POST_DATA"];
$file = fopen("init.xml", "wb");
fwrite($file, $xml);
fclose($file);
echo($GLOBALS["HTTP_RAW_POST_DATA"]);
}
?>
沒有留言:
張貼留言