Stream FTP download to output

后端 未结 6 1189
耶瑟儿~
耶瑟儿~ 2020-12-03 06:06

I am trying to stream/pipe a file to the user\'s browser through HTTP from FTP. That is, I am trying to print the contents of a file on an FTP server.

This is what

6条回答
  •  时光说笑
    2020-12-03 06:27

    Try:

    @readfile('ftp://username:password@host/path/file');
    

    I find with a lot of file operations it's worthwhile letting the underlying OS functionality take care of it for you.

提交回复
热议问题