如何使用PHP从Amazon S3打开.doc,.docx和图像文件?
这是我的代码:
$objInfo = $s3->getObjectInfo(BUCKETNAME, 'n77yrSahsahfdghasfdh.doc');
$obj = $s3->getObject(BUCKETNAME, 'n77yjgsahfdghasfdh.doc');
header('Content-Type: ' . $objInfo["type"]);
header('Content-Disposition: attachment; filename=teetetet');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
echo $object->body;
This code is not working
let me know how to open the doc ,docx and image file from amazon s3.