is it possible in php to download uploaded excel sheet by taking only its filename from the database?? if so solve my pblm..thank u..:)
sruthisru 0 Newbie Poster
Recommended Answers
Jump to PostTry another file, maybe that one was corrupt on upload or something.
Jump to PostUsing your original code and looking at header in the php.net documentation I've constructed this:-
if(file_exists($filename)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$filename.'"'); readfile($filename); } else { die('not ok'); }
All 7 Replies
sruthisru 0 Newbie Poster
urtrivedi 276 Nearly a Posting Virtuoso
sruthisru 0 Newbie Poster
sruthisru 0 Newbie Poster

iLikePHP
sruthisru 0 Newbie Poster
paulkd 59 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.