如何保护图像目录 [英] How to protect an image directory

查看:109
本文介绍了如何保护图像目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在根目录中有一个图像目录"wb_imgs".我希望没有人可以更改/覆盖或删除该目录的图像.我该如何使用.htaccess或其他方式呢?

I have an images directory "wb_imgs" inside the root directory. I want that no one can change / overwrite or delete the images of this directory. How can I do that using .htaccess or some other way???

推荐答案

您可以相应地为目录设置只读访问权限;它取决于操作系统,与编程无关,仅需简单的管理即可.但是,除非您有意编写一些服务器端代码来执行此操作,否则Web应用程序用户无论如何都无法更改图像和其他文件.

—SA
You can simply set up permissions for the directory accordingly for read-only access; it depends on OS and has nothing to do with programming, just a simple administration. However, the image and other files cannot be changed by the users of Web application anyway, unless you intentionally write some server-side code to do that.

—SA


这篇关于如何保护图像目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆