You are here: Re: Using readfile to bring a "save as" dialog box up « All PHP « IT news, forums, messages
Re: Using readfile to bring a "save as" dialog box up

Posted by vamichael on 05/04/06 07:32

I tried your suggestion and it still didn't work. My latest attempt
looks like:


<?php
$file_access_name='testdl.exe';
$file_download_name='testdl.exe';
$file_length = filesize($file_access_name);

header("Content-disposition: filename=$file_download_name");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Length: ".$file_length);
readfile($file_access_name);
?>

I'm beginning to suspect it might be a problem with my web host
provider. Could someone test this on their server and let me know if
it works? thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация