Php beginners-about file downloading Hello everyone. I am a beginner. I just watched the file downloading section in the video of Chuanzhi podcast, according to the code given by instructor Han, why is the picture displayed on the page rather than downloaded from the browser? Thank you for your help & lt ;? Php $ f php for beginners-about file download
Hello everyone, I am a newbie. I just read the file download section in the video of Chuanzhi podcast. I wrote it myself according to the code given by instructor Han, but why is the image displayed on the page instead of being downloaded from the browser?
Thank you for your help.
$ File_name = "mao.jpg ";
If (! File_exists ($ file_name )){
Echo "the file does not exist! ";
Return;
}
$ Fp = fopen ($ file_name, "r ");
$ File_size = filesize ($ file_name );
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.