简体   繁体   中英

Content-Disposition: attachment;

How can i force content-disposition dir? it get the file from temp dir... i would like to change thi dir...

header("Content-type: application/zip");
header('Content-Disposition: attachment; filename="' .$file_zip. '"');

The filename attribute is supposed to hold only the filename, not the entire file path. Get rid of that path. It's up to the enduser (and its webbrowser configuration) where to save the file. There is no way to control the save location from the server side on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM