search

Home  >  Q&A  >  body text

I followed the teacher’s video encapsulation to download the function library. But cannot download

function dow_file($filename){
    header('Accept-Length:'.filesize($filename));
    header('Content-Disposition:attachment;filename='.basename($filename));
    readfile($filename);
}
dow_file('www.zip');

The www.zip file under this file exists. And the directory is correct.


#But the page that opens is blank. Even now it's a picture. It is also parsed in a garbled format.

Could you please ask the teacher if there is any extension function that needs to be opened?

F2EAF56A-0E5C-493E-97B9-D702DA24AE57.png



善為善為2132 days ago1012

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2019-02-22 16:38:50

    If the page is blank, you need to check whether the data in your returned response body is correct

    reply
    0
  • Cancelreply