Skip to content
Advertisement

Should I use PHP readfile() or SFTP connection to download file from my server through a web app?

I was thinking about replacing all my PHP readfile() function calls into SFTP connections request to download files from my server.

Is this safer ?

Note : my files are on the same server as the web app, so is this useless to pass through SFTP ?

Thank you for your concern.

Advertisement

Answer

“If they’re on the same server, you don’t necessary need SFTP. That’s like using a FTP to browse files locally on your computer – Cid 29 mins ago”

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement