popmotsy Posted March 18, 2009 Share Posted March 18, 2009 hii to all..... i want to gve an option of downloading in my php page,,,,i wana download that particular page on which i m selecting the data from database,,to a specific folder,,,, can any one give me the proper code for this,,,,,thanks.... ??? ??? Quote Link to comment https://forums.phpfreaks.com/topic/150017-download-thru-php/ Share on other sites More sharing options...
drisate Posted March 18, 2009 Share Posted March 18, 2009 How abbout starting with a proper explanation lol didin't understand a thing hehe Quote Link to comment https://forums.phpfreaks.com/topic/150017-download-thru-php/#findComment-787840 Share on other sites More sharing options...
WolfRage Posted March 18, 2009 Share Posted March 18, 2009 Where is that damn Crystal Ball at? I know I put it around here somewhere? Quote Link to comment https://forums.phpfreaks.com/topic/150017-download-thru-php/#findComment-787854 Share on other sites More sharing options...
Cory94bailly Posted March 18, 2009 Share Posted March 18, 2009 <a href="http://MySite.com/downloads/1.jpg">Download This!</a> That is html... If you would like to have it so people can ONLY download from the script and (almost) never directly, use php header.. header("Content-Type: application/zip"); header('Content-Disposition: attachment; filename="1.zip"'); readfile('/downloads/a7375498_848jfkjJGJSD/1.zip'); die(); For the header, you can change the filename="" to anything that you want ('fool' the user..) The readfile() MUST be the path to the actual file or the file will show as 0kb and won't be anything.. Quote Link to comment https://forums.phpfreaks.com/topic/150017-download-thru-php/#findComment-787861 Share on other sites More sharing options...
drisate Posted March 18, 2009 Share Posted March 18, 2009 looks like Cory94bailly stole it hahaha Quote Link to comment https://forums.phpfreaks.com/topic/150017-download-thru-php/#findComment-787868 Share on other sites More sharing options...
popmotsy Posted March 19, 2009 Author Share Posted March 19, 2009 hii to all.... .i just wanna code that export mysql data to the excel sheet or text file,,,,,but without using phpmyadmin,,,,i wanna a perfect code for this.... Quote Link to comment https://forums.phpfreaks.com/topic/150017-download-thru-php/#findComment-788260 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.