<?php
$filename="game1".microtime_float().".wav";//要生成的图片名字
$filejing="Wav/game1/".$filename;
$xmlstr = $GLOBALS[HTTP_RAW_POST_DATA];
if(empty($xmlstr)) {
$xmlstr = file_get_contents('php://input');
}
$wavs = $xmlstr;//得到post过来的二进制原始数据
$file = fopen("D:/xampp/htdocs/Pinggu/Wav/game1/".$filename,"w");//打开文件准备写入
fwrite($file,$wavs);//写入
fclose($file);//关闭
$dataList = $filename;
header("http://localhost/Pinggu/php/game1.php?data=".$dataList );
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
?>
这是b.php
$filename="game1".microtime_float().".wav";//要生成的图片名字
$filejing="Wav/game1/".$filename;
$xmlstr = $GLOBALS[HTTP_RAW_POST_DATA];
if(empty($xmlstr)) {
$xmlstr = file_get_contents('php://input');
}
$wavs = $xmlstr;//得到post过来的二进制原始数据
$file = fopen("D:/xampp/htdocs/Pinggu/Wav/game1/".$filename,"w");//打开文件准备写入
fwrite($file,$wavs);//写入
fclose($file);//关闭
$dataList = $filename;
header("http://localhost/Pinggu/php/game1.php?data=".$dataList );
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
?>
这是b.php