<?php
$fileName = 'mypic.jpg';
$mimeType = 'image/jpeg';
header('content-disposition: attachment; filename=' . $fileName);
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??
Request for tunning the below query
Hi,
Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't understand at all is interfaces. I understand the implications of multiple inheritance, and interface is
How to extract/download content from HTTPS page?
Hello to all the Members of this forum, Im Shoiab, A novice programmer in php.. for my first job I have been recently assigned a project, in which I have got to extract/download the contents of the
Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:
CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones I could give a try? I was going to script one but what I want it for was confusing me when I was
Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like, I want it do something like this:Quoteecho $a1;echo $a2;echo $a3;echo $a4;echo $a5.$b;echo $a6;And
FAGL_FC_TRANSLATION FAS52 New GL ECC 6.0
Hello,
Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and probably not the most efficiant in the world) but it was quite late when I wrote it and I can't be
Rounding a number queried from a database
I know that to display a rounded number you just do echo "round($number)";. But how would I convert the $number varible into a rounded number, so that when I say echo "$number";
Multiple websites question.
Hi, does php have any functionality that enables a programmer to extract information from a website on the internet and display it on their own? Any help or suggestions on where to go and look for a