我正在使用 csv 文件来验证用户登录.是否可以用密码保护 CSV 文件?我不希望任何人能够通过 url 下载 csv 文件.我用谷歌搜索,发现无法用密码保护 csv 文件.有没有其他办法可以用密码保护文件?
I am using a csv file to authenticate user login. Is it possible to password protect the CSV file? I do not want anybody to be able to download the csv file through url. I googled and I found out that it is not possible to password protect a csv file. Is there any other way I can password protect the file?
推荐答案简短的回答是否定的:CSV 是纯文本格式,而不是 Excel.
the short answer is no: CSV is a plain text format, it's not Excel.
长的答案是:您永远不应该将安全相关信息放入可通过网络服务器访问的文件夹中.将文件移动到您可以从 PHP 访问但位于 Apache 中文档根目录之外的文件夹中
the long answer is: you should never put security relevant information into a folder which is accessible via the webserver. move the file into a folder you can access from PHP but which is outside of your document root in Apache
更多推荐
密码保护 CSV 文件
发布评论