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

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

pls clear my confusion
Hi friends,

Pls solve my query .

what is the exact use of Scope Resolution Operator( i

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

data type in column definition
Hi,
I create a table with column called "Direction of Travel code ".
The travel codes in t

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

code help - pagination
Hi all, I have this code, basically a user logs into my site and they get this page.

The pro

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

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