renatoburton 0 Denunciar post Postado Fevereiro 26, 2016 ola galera estou tendo um ploblema que ta enchendo o saco estou com um script de download forçado ae tudo bem ele fais o download normal com o nome estensão até o tamanho doa arquivo batem ae tipo se for img e eu clico ela não abre fala que nao tem suporte sendo que a original abre ae tentei com video mesma coisa fais download tudo certinho mais quando clico não abre :/ $file = 'cap.mp4'; if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } Nota: QUANDO ABRO A IMG PELO PHOTHOSHOP DA UNS AVISOS LÁ ITAL MAIS ELA ABRE APENAS POR VISUAÇLIZÇAÕ NORMAL QUE NÃO ABRE :/ Compartilhar este post Link para o post Compartilhar em outros sites
renatoburton 0 Denunciar post Postado Fevereiro 26, 2016 olá resolvido para todo os arquivos tem que por ob_end_clean(); flush(); antes do readfile($file); Compartilhar este post Link para o post Compartilhar em outros sites