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... Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
george_king Posted November 12, 2007 Author Share Posted November 12, 2007 by link... Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.