如何使用PHP将文件.png转换为.CUBE
我找不到解决这个问题的代码,也许有人可以帮我,我想让file.png上传,然后我按生成按钮,它将是.CUBE并自动下载它请检查下面的代码,它对我有效如何使用PHP将文件.png转换为.CUBE,php,converters,Php,Converters,我找不到解决这个问题的代码,也许有人可以帮我,我想让file.png上传,然后我按生成按钮,它将是.CUBE并自动下载它请检查下面的代码,它对我有效 $fileupload = $_FILES['fileupload']['name']; $fileName = pathinfo($fileupload)['filename']; $fileExtension=pathinfo($fileupload)['extension']; if($fileExtension=="png&quo
$fileupload = $_FILES['fileupload']['name'];
$fileName = pathinfo($fileupload)['filename'];
$fileExtension=pathinfo($fileupload)['extension'];
if($fileExtension=="png")
{
$fileupload = $fileName.".CUBE";
}
$filePathURL=$fileupload;
move_uploaded_file($_FILES['fileupload']['tmp_name'], "$filePathURL");
header("Cache-Control: private");
header("Content-Type: application/stream");
header("Content-Disposition: attachment; filename=".$fileupload);