.PEM 的存储位置,无人可以访问,但可以在 PHP 中访问
http://www.stellarwebsolutions.com/en/articles.php
我刚刚得到了.pem 与 paypal 一起使用,但我无法找到一种方法来访问 .pem,而不将其放在我的 public_html/ 文件夹中,我知道这可能不是最好的方法。有没有办法从 php 访问我的 ssh 根目录?或者我的 ssh 的其他区域?
http://www.stellarwebsolutions.com/en/articles.php
I just got the .pem to work with paypal but I cannot find a way to access the .pem without putting it on my public_html/ folder which I know is probably not the best way of doing it. Is there a way of accessing the root of my ssh from php? or other areas of my ssh?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以轻松访问 public_html 文件夹之外的任何文件,只需确保 Web 服务器用户可以访问该文件即可。例如:
以下 php 脚本正在读取 test.txt:
您还可以将文件放入 public_html 文件夹中,并使用 .htaccess 拒绝访问:
You can easily access any file outside of your public_html folder, you just have to make sure that the file is accessible to the web server user. For instance:
And the following php script is reading the test.txt:
You can also put your file in your public_html folder and deny access with a .htaccess: