473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Can you post code for downloading files?

I wrote this code but downloaded file is wrong, Can you watch part of my code :
Expand|Select|Wrap|Line Numbers
  1. $dataT = @mysql_result($result, 0, $data['data']);
  2.     $name = @mysql_result($result, 0, $data['name']);
  3.     $size = @mysql_result($result, 0, $data['size']);
  4.     $type = @mysql_result($result, 0, $data['mime']);
  5.     header("Content-type: $type");
  6.     header("Content-length: $size");
  7.     header("Content-Disposition: attachment; filename=$name");
  8.     header("Content-Description: PHP Generated Data");
  9.     header("Content-transfer-encoding: binary");
  10.     echo $dataT;
Aug 2 '13 #1
2 1335
Luuk
1,047 Expert 1GB
Can you please add why you think your code is wrong (or the error-message(s))?
Or should we guess.... ;)
Aug 3 '13 #2
Thanks for your answer and excuse me! This code is working. Code of searching was not working but it is ok now
Aug 3 '13 #3

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

Similar topics

1
by: Ursula Peter-Czichi | last post by:
Found a different way to do it - onto the next problem... >-----Original Message----- >Software: WIN XP Professional, IIS 5.1, Visual Studio.Net >2002 - >I have figured out why my .aspx files...
1
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...
4
by: Chris | last post by:
I work on a development server (Server A), and have a staging server (Server B), where updated ASP.Net files from Server A are sent to. I noticed that Server B will reflect changes made to .aspx...
7
by: Alan Silver | last post by:
Hello, I am just looking at VWD and seeing what needs doing to take an existing site I've written by hand and importing it into VWD. I've already discovered that I need to rename my code-behind...
8
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. ...
2
by: andy | last post by:
I have a routine I call to post XML from vb.net to a url over http It can be the XML file can be quite a size sometime I expect it to exceed 10mb. I started using a routine to post the file to a...
4
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
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...
1
by: getin4bob | last post by:
Please provide me with the asp.net C# code for downloading files from ftp server to client
2
by: CindyH | last post by:
Hi Trying to get this code to work for http xml post. I need the post to be xml (doc.outerxml) sent in single key name as stream. The following is the post code and code for receiving the request....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...
0
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...

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.