473,509 Members | 2,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem Downloading files from Database

3 New Member
I am trying to download a file stored in a mysql database. When I try to use php to output the file, it does not get saved with the proper file name, but instead both IE7 and FF5 do not save the flyer with the name and type that I have given it but instead try to save it as displayFlyer.php which is the name of my script. The server is running on an XAMPP setup of Apache 2.2.,4
MySQL 5.0.33, PHP 5.2.1, PEAR HTTP_Download 1.1.1
================================================== =====
Source Code:
================================================== =====
[php]
<?php /*php database stuff is all working properly.*/
$item = $result_set->fetchRow();

require_once 'HTTP/Download.php';
$params['data']=$item['flyer'];
$params['cache']=true;
$params['contenttype']=$item['flyerType'];
$toDownload = new HTTP_Download($params);
$toDownload->setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT,$i tem['flyerName']);
$toDownload->setCacheControl("public",3600);
$toDownload->send(true);
exit;
?>
[/php]
================================================== =====
I have also tried by using the header commands and writing from scratch and am getting the exact same result.
Mar 27 '07 #1
1 1189
kwfinken
3 New Member
OOPS...Disregard...I had an id10t error...miscapitalized in the SQL code that I was sure was correct.
Mar 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1391
by: Mel | last post by:
on my web site you will have to login to see downloads etc. However once the user logs in the file url is exposed and the end user can bookmark the downloadable file and pass it on to others is...
1
1561
by: Kajol | last post by:
Hi I am facing a strange problem in downloading files from the web. CASE 1: I have an ActiveX.dll file developed using Visual Basic 6.0 and uploaded on a Linux Server. I am typing...
6
3008
by: Tony K | last post by:
I have the most peculiar problem with an ASP.NET page which we use for downloading a file. When the user clicks on a link, the link points to an ASPX page which downloads the file selected. ...
8
14130
by: Ken | last post by:
Can anyone point me to some info, which gives me an idea of how to go about making an ASP.NET web service to download files I plan to access the web service from a C# Windows App. Thanks. ...
4
1831
by: c83 | last post by:
I am using Active Perl, and i-am having problems downloading files from internet because of the proxy. The script is workin when no proxy is present, but now it refuses to download files. Here is...
7
2532
by: Ehsan | last post by:
I foundd this code in ASPN Python Cookbook for downloading files in python but when it finished downloading files the files became corrupted and didn't open, the files in internet havn't any...
0
1357
by: mahesh123 | last post by:
Hi, I am new to use the crystal reports8.0. I am facing the problem regarding the database connection through the ADO Connection. Suppose my database name is "sample.pra"(due to some security...
1
1200
by: getin4bob | last post by:
Please provide me with the asp.net C# code for downloading files from ftp server to client
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.