密码保护 CSV 文件 [英] Password protect a CSV file

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

问题描述

我正在使用 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 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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