george_king Posted November 12, 2007 Share Posted November 12, 2007 Hi, can you advise PHP script for download a file from server to client? Thank you for answer... Link to comment https://forums.phpfreaks.com/topic/77017-download-a-file-with-php/ Share on other sites More sharing options...
centerwork Posted November 12, 2007 Share Posted November 12, 2007 Did you want this done automaticly, link, or with an email? Link to comment https://forums.phpfreaks.com/topic/77017-download-a-file-with-php/#findComment-390117 Share on other sites More sharing options...
george_king Posted November 12, 2007 Author Share Posted November 12, 2007 by link... Link to comment https://forums.phpfreaks.com/topic/77017-download-a-file-with-php/#findComment-390129 Share on other sites More sharing options...
centerwork Posted November 12, 2007 Share Posted November 12, 2007 Just a basic file. <a href="yourfile" >Name</a> if the file name changes: <?php $file_name = $row['yourfile']; //Where ever you are pulling the file from wether it is a database or echo '<a href="'.$file_name.'" >'.$file_name.'</a>'; ?> It would help to know more information about what you are doing. Link to comment https://forums.phpfreaks.com/topic/77017-download-a-file-with-php/#findComment-390141 Share on other sites More sharing options...
Branden Wagner Posted November 12, 2007 Share Posted November 12, 2007 I think whure looking for is how to force download... just google "php force download" there are a bunch of different ways.. but basic concept is using headers making the its content-type an application so that the browser doesnt try to parse or read the file, whether its html, or php or whatever it may be. Link to comment https://forums.phpfreaks.com/topic/77017-download-a-file-with-php/#findComment-390175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.