Actionscript 3 AS3 ALIVEPDF通过method.remote(PHP)保存不再工作
SWF位于web服务器上。我正在使用AS3中的代码调用函数Actionscript 3 AS3 ALIVEPDF通过method.remote(PHP)保存不再工作,actionscript-3,flash,alivepdf,Actionscript 3,Flash,Alivepdf,SWF位于web服务器上。我正在使用AS3中的代码调用函数 myPDF.save(Method.REMOTE, "http://www.example.com/generator/createpdf.php", Download.ATTACHMENT, "line.pdf"); 这是我在服务器上的PHP脚本 $method = $_GET['method']; $name = $_GET['name']; if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA
myPDF.save(Method.REMOTE, "http://www.example.com/generator/createpdf.php",
Download.ATTACHMENT, "line.pdf");
这是我在服务器上的PHP脚本
$method = $_GET['method'];
$name = $_GET['name'];
if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {
// get bytearray
$pdf = $GLOBALS["HTTP_RAW_POST_DATA"];
// add headers for download dialog-box
header('Content-Type: application/pdf');
header('Content-Length: '.strlen($pdf));
header('Content-disposition:'.$method.'; filename="'.$name.'"');
echo $pdf;
} else echo 'An error occured.';
它过去可以工作,但不久前就停止了。任何帮助都将不胜感激。1这对我也不起作用,直到我添加了以下内容-
if(!$HTTP_RAW_POST_DATA){
$HTTP\u RAW\u POST\u DATA=file\u get\u contents'php://input’;
}
2我还打了/src/org/alivepdf/pdf/pdf.as::根据这篇文章保存