file downloaded can't be read !!


Posted on 16th Feb 2014 07:03 pm by admin

<?php
$fileName = 'mypic.jpg';
$mimeType = 'image/jpeg';
header('content-disposition: attachment; filename=' . $fileName);
Did you know?Explore Trending and Topic pages for more stories like this.
header('content-type: ' . $mimeType);
header('content-length: ' . filesize($fileName));
readfile($fileName);
?>

i tried to download the file called "mypic.jpg" which is stored inside folder called "myfolder"... i use the code written above, n i can download the file but once open nothing was shown up!....

What's wrong?? path?? can anyone help me with this code??
No comments posted yet

Your Answer:

Login to answer
238 Like 10 Dislike
Previous forums Next forums
Other forums

how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

Passing vars to the DB
I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TY

Dynamic memory problem
Hey,

At the beginning of my code, I have this line:

Shape* gShape = 0;

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

check if value exists
I have googled this for a while and I am getting lots of different results. Is there a standard meth

HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash