简体   繁体   English

使用.htaccess限制文件夹是否会阻止内部服务器cron作业访问该文件夹中的php文件?

[英]Will restricting a folder with .htaccess hinder internal server cron job access to a php file within that folder?

I have a GoDaddy server upon which I have a Cron job setup running a php script once per day. 我有一台GoDaddy服务器,我每天在该服务器上执行一次php脚本的Cron作业设置。 I would like to restrict public access to this script. 我想限制公众对此脚本的访问。 Will restricting the folder in which the script is located via .htaccess hinder my server's internal ability to run the script with the cron job? 通过.htaccess限制脚本所在的文件夹是否会妨碍服务器内部使用cron作业运行脚本的能力?

.htaccess are handled by webserver (eg apache). .htaccess由网络服务器(例如apache)处理。 Cron jobs are scheduled tasks which is independent of your htaccess. Cron作业是计划的任务,与您的htaccess无关。 So non it will not hinder. 因此,它不会阻碍。

Just you need to make sure your script permissions are OK. 只需要确保您的脚本权限确定即可。

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

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