Creating a Secure File Hosting Server for PDFs

前端 未结 3 1711
小蘑菇
小蘑菇 2020-12-06 02:51

I\'m working to develop a website that allows clients to log in and see various PDFs saved on the server. These PDFs will be unique to the client and should no

3条回答
  •  囚心锁ツ
    2020-12-06 03:30

    Put the files outside of the webroot. Then using PHP pass the file though a script. That way no one can link to the file directly and bypass your controls. (Naturally make sure the script that does this only after verifying the user has permission to retrieve that file).

    Sample PHP:

    
    

提交回复
热议问题