Thinbug
News
如何保护php和文件夹文件免遭未经授权的访问?
时间:2019-07-23 20:41:27
标签:
php
mysql
apache
我想阻止直接访问不同的php文件(例如,写
http://testpage.com/login_verif.php
),例如登录验证文件(对用户进行身份验证)。
用户是否可以访问将他连接到mysql数据库的
config.php
文件(并在其中写入密码)?
此外,如何配置
uploads
文件夹,以便用户只能看到具有其URL的图像?
1 个答案:
答案 0 :(得分:0)
如果没有数据发布到文件和/或
place the file in a more controlled area
,则退出文件。
You should not have a config.php file - they are very much not safe, but instead environment variables
。
您可以研究
rewriting to disallow direct access
,但允许在域上进行引用。
相关问题
保护php文件不被直接访问
保护PHP脚本免受未经授权的访问
Codeigniter:保护文件夹不被直接访问
保护JSP页面免受未经授权的访问
如何保护纯HTML页面免受未经授权的访问?
如何保护ApplicationSupport文件夹中的数据免受iOS中的未授权访问?
保护对图像文件夹的直接访问
如何保护密钥库免受未经授权的访问
如何保护从其他文件夹删除文件
如何保护php和文件夹文件免遭未经授权的访问?
最新问题
我写了这段代码,但我无法理解我的错误
我无法从一个代码实例的列表中删除 None 值,但我可以在另一个实例中。为什么它适用于一个细分市场而不适用于另一个细分市场?
是否有可能使 loadstring 不可能等于打印?卢阿
java中的random.expovariate()
Appscript 通过会议在 Google 日历中发送电子邮件和创建活动
为什么我的 Onclick 箭头功能在 React 中不起作用?
在此代码中是否有使用“this”的替代方法?
在 SQL Server 和 PostgreSQL 上查询,我如何从第一个表获得第二个表的可视化
每千个数字得到
更新了城市边界 KML 文件的来源?