¡@

Home 

php Programming Glossary: mimetypes

Files sometimes download as .PHP instead of .PDF?

http://stackoverflow.com/questions/17872470/files-sometimes-download-as-php-instead-of-pdf

if it would happen for other types as well. Here's my code mimeTypes array images 'png' 'image png' 'jpeg' 'image jpeg' 'jpg' 'image.. Description File Transfer' header 'Content Type ' . mimeTypes row 'ext' header 'Content Disposition attachment filename '...

HTTP Headers for File Downloads

http://stackoverflow.com/questions/386845/http-headers-for-file-downloads

function outputFile filePath fileName mimeType '' Setup mimeTypes array 'pdf' 'application pdf' 'txt' 'text plain' 'html' 'text.. substr strrchr filePath '.' 1 if array_key_exists fileExt mimeTypes mimeType mimeTypes fileExt else mimeType 'application force.. '.' 1 if array_key_exists fileExt mimeTypes mimeType mimeTypes fileExt else mimeType 'application force download' Disable..

PHP to protect PDF's and DOC's

http://stackoverflow.com/questions/7427457/php-to-protect-pdfs-and-docs

support file types for download script and there mimetype mimeTypes array 'doc' 'application msword' 'pdf' 'application pdf' set.. headers to browser fp fopen file r header Content Type . mimeTypes ext header 'Content Disposition attachment filename '. fileName.'..