Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有专用服务器,控制面板是 DirectAdmin,操作系统是 linux。使用 PHP 中的复制 copy ( "https://example.com/file.mp3" , string $dest)命令,可以复制文件。我该如何预防?防止将服务器复制到服务器此链接,例如:https://example.com/file.mp3
copy ( "https://example.com/file.mp3" , string $dest)
https://example.com/file.mp3
看看 ServerFault 上的这个问题(假设你使用 Apache2):
Apache .htaccess 文件以限制对文件的访问,除非从某个 url 加载
或这个:
控制 Apache referrer 以限制 htaccess 文件中的下载