post提交过来的:content-Type:application/octet-stream
以下是关键代码:
<?php
$input_handler = fopen('php://input', 'r');
$path = $basePath.'123456.'.$ext;
$temp = tmpfile();
$realSize = stream_copy_to_stream($input_handler, $temp);
fclose($input_handler);
$out_handler = fopen($path, 'w');
fseek($temp, 0, SEEK_SET);
stream_copy_to_stream($temp, $out_handler);
fclose($out_handler);
?>
點擊查看更多內容
8人點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優質文章
正在加載中
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦