can't transfer tiff or modi file with PHP -


this snippet should transfer file tiff or modi web server user web

header('content-description: file transfer'); header('content-type: ' . $file_mime_type); header('content-disposition: attachment; filename="' . $file_name . '"'); header('content-transfer-encoding: binary'); header('expires: 0'); header('cache-control: must-revalidate'); header('pragma: public'); header('content-length: ' . $file_size);  # till moment fine echo file_get_contents("path/to/file.tif"); # script fails on line above, , doesnt reach place 

when file format not tiff or modi, works fine , client browser start downloading file (docx/xlsx/pdf/etc.) when user try download tiff or modi, script fails without error. have tried print(file_get_contents("path/to/file.tif")); , readfile("path/to/file.tif"); instead of echo, result same


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -