如何使.PHP文件只能由服务器访问? [英] How to make .PHP file only accessible to the server?
本文介绍了如何使.PHP文件只能由服务器访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过goDaddy控制中心创建了Cron作业.
I created a cron job through goDaddy control center.
cron作业位于"cron作业"文件夹中.
The cron job is in the folder "cron jobs".
我不希望任何人都能运行它,我该如何设置文件夹的权限,以使其无法公开打开,但仍可用于cron作业?
I don't want anyone to be able to run it, how should I set the permissions of the folder so that it can't be publicly opened but it still can be used for the cron job?
将取消选中公共">阅读"足以阻止任何人运行它吗?
Will unchecking Public > Read be enough to prevent anyone from running it?
推荐答案
只需将文件放在webroot/文档根文件夹之外.
Just put the files outside of the webroot/document root folder.
这篇关于如何使.PHP文件只能由服务器访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文