Posted by Ivan Omelchenko 608308824 on 10/26/05 11:17
Daedalus.OS пишет:
> Instead of refreshing to a static files, refresh to a php file that will
> send back the file.
>
> Lets say when the user click the link it brings him to some_page.php. In
> this page you would put this code:
>
> <META HTTP-EQUIV="refresh" content="1;
> URL=http://yoursite.com/some/folder/file_gen.php">
>
> file_gen.php should now generate the file and sent it back to be downloaded.
> Without more detail about this generated file I can't tell you how exactly
> to send it back. But here is a simple exemple that would return a
> dynamically created javasctipt to be downloaded:
>
> // The file is generated and its handler is contained by $file...
> header('Content-type: application/javascript');
> header("Content-length: ".filesize($file));
> header('Content-Disposition: attachment; filename="destination_name.js"');
> readfile($file);
>
Hows about $file that weight more then 8Mb ?
You can't do it with movie, for example.
Navigation:
[Reply to this message]
|