简体   繁体   English

使用wget下载具有登录详细信息的php

[英]download php with login details using wget

If I have a php file that contains my twitter access and consumer keys and secrets in plain text, isn't it possible that somebody can just download that php file using, for example, wget, read the file and then know my twitter login keys? 如果我的php文件以纯文本形式包含我的twitter访问权限,用户密钥和机密,那么是否有人可以使用例如wget来下载该php文件,读取该文件,然后知道我的twitter登录密钥, ? How would I protect against this? 我将如何防范呢?

第一种,将这些文件存储在文档根目录之外,第二种,否,如果服务器设置正确,则客户端永远无法获取PHP文件的源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM