<bdo id='S5r1M'></bdo><ul id='S5r1M'></ul>
      <tfoot id='S5r1M'></tfoot>
      <i id='S5r1M'><tr id='S5r1M'><dt id='S5r1M'><q id='S5r1M'><span id='S5r1M'><b id='S5r1M'><form id='S5r1M'><ins id='S5r1M'></ins><ul id='S5r1M'></ul><sub id='S5r1M'></sub></form><legend id='S5r1M'></legend><bdo id='S5r1M'><pre id='S5r1M'><center id='S5r1M'></center></pre></bdo></b><th id='S5r1M'></th></span></q></dt></tr></i><div id='S5r1M'><tfoot id='S5r1M'></tfoot><dl id='S5r1M'><fieldset id='S5r1M'></fieldset></dl></div>

      <small id='S5r1M'></small><noframes id='S5r1M'>

        <legend id='S5r1M'><style id='S5r1M'><dir id='S5r1M'><q id='S5r1M'></q></dir></style></legend>
      1. 在 linux/apache 服务器上的 cron 作业上运行 script.php,但限制对 php 文件的公共访问

        Run a script.php on cron job on linux/apache server but restrict public access to the php file(在 linux/apache 服务器上的 cron 作业上运行 script.php,但限制对 php 文件的公共访问)

        <small id='noluL'></small><noframes id='noluL'>

        1. <legend id='noluL'><style id='noluL'><dir id='noluL'><q id='noluL'></q></dir></style></legend>
          • <i id='noluL'><tr id='noluL'><dt id='noluL'><q id='noluL'><span id='noluL'><b id='noluL'><form id='noluL'><ins id='noluL'></ins><ul id='noluL'></ul><sub id='noluL'></sub></form><legend id='noluL'></legend><bdo id='noluL'><pre id='noluL'><center id='noluL'></center></pre></bdo></b><th id='noluL'></th></span></q></dt></tr></i><div id='noluL'><tfoot id='noluL'></tfoot><dl id='noluL'><fieldset id='noluL'></fieldset></dl></div>
                <bdo id='noluL'></bdo><ul id='noluL'></ul>

                    <tbody id='noluL'></tbody>

                  <tfoot id='noluL'></tfoot>
                  本文介绍了在 linux/apache 服务器上的 cron 作业上运行 script.php,但限制对 php 文件的公共访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有这个 script.php 文件,我想在我的 linux/apache 服务器上将其作为 cron 作业运行.

                  I have this script.php file which i want to run as a cron job on my linux/apache server.

                  但是,我不希望公众访问 www.mycompanyname.com/script.php 并同时运行脚本.

                  However, i do not want public to access www.mycompanyname.com/script.php and also run the script concurrently.

                  我们如何防止这种情况发生?我们如何限制脚本只能访问服务器?是使用 chmod 还是在 .htaccess 文件中设置了一些东西?

                  How can we prevent that? How can we restrict the script to the server's access only? Is it using chmod or setting something inside .htaccess file, something along the line?

                  有什么建议吗?

                  推荐答案

                  您可能有一个类似于 public_html 的目录,其中包含所有 php.把它放在那个目录之外.

                  You probably have something like a public_html directory, in which you have all the phps. Just put it outside of that directory.

                  这篇关于在 linux/apache 服务器上的 cron 作业上运行 script.php,但限制对 php 文件的公共访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                1. <small id='Rc9ve'></small><noframes id='Rc9ve'>

                      <bdo id='Rc9ve'></bdo><ul id='Rc9ve'></ul>
                    • <legend id='Rc9ve'><style id='Rc9ve'><dir id='Rc9ve'><q id='Rc9ve'></q></dir></style></legend>
                          <tbody id='Rc9ve'></tbody>

                            <tfoot id='Rc9ve'></tfoot>
                            <i id='Rc9ve'><tr id='Rc9ve'><dt id='Rc9ve'><q id='Rc9ve'><span id='Rc9ve'><b id='Rc9ve'><form id='Rc9ve'><ins id='Rc9ve'></ins><ul id='Rc9ve'></ul><sub id='Rc9ve'></sub></form><legend id='Rc9ve'></legend><bdo id='Rc9ve'><pre id='Rc9ve'><center id='Rc9ve'></center></pre></bdo></b><th id='Rc9ve'></th></span></q></dt></tr></i><div id='Rc9ve'><tfoot id='Rc9ve'></tfoot><dl id='Rc9ve'><fieldset id='Rc9ve'></fieldset></dl></div>