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

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

        <bdo id='IOG54'></bdo><ul id='IOG54'></ul>
      <legend id='IOG54'><style id='IOG54'><dir id='IOG54'><q id='IOG54'></q></dir></style></legend>

        $_SERVER['DOCUMENT_ROOT'] 在通过 cron 运行的 php 脚本中不起作用

        $_SERVER[#39;DOCUMENT_ROOT#39;] does not work in the php script running through cron ($_SERVER[DOCUMENT_ROOT] 在通过 cron 运行的 php 脚本中不起作用)

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

            <tbody id='Kv54M'></tbody>

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

            <tfoot id='Kv54M'></tfoot>

                • <bdo id='Kv54M'></bdo><ul id='Kv54M'></ul>
                  <legend id='Kv54M'><style id='Kv54M'><dir id='Kv54M'><q id='Kv54M'></q></dir></style></legend>
                  本文介绍了$_SERVER['DOCUMENT_ROOT'] 在通过 cron 运行的 php 脚本中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用 $_SERVER['DOCUMENT_ROOT']."/lib/sft_required.php";在 PHP 脚本中包含sft_required"文件.当我使用浏览器运行此文件时,它工作正常,但是当我将它作为 cron 作业运行时,它不起作用.我们通过cron运行脚本的时候好像没有包含这个文件.

                  I use $_SERVER['DOCUMENT_ROOT']."/lib/sft_required.php"; to include the 'sft_required' file in a PHP script. When I run this file using browser, it works fine but when I run this as a cron job job, it does not work. It seems that the file is not included when we run the script through cron.

                  推荐答案

                  假设您直接通过 cron 运行脚本(而不是从由 cronjob 触发的 HTTP 请求访问的 Web 服务器(例如通过 cron 运行 wget)),那当然不行.

                  Assuming you are running the script directly through cron (as opposed to from a web server accessed by an HTTP request triggered by a cronjob (e.g. by cron running wget)), then of course it doesn't work.

                  没有服务器,所以没有设置$_SERVER.

                  There is no server, so $_SERVER is not set.

                  这篇关于$_SERVER['DOCUMENT_ROOT'] 在通过 cron 运行的 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 的问题)
                    <bdo id='mgcQ9'></bdo><ul id='mgcQ9'></ul>
                  • <legend id='mgcQ9'><style id='mgcQ9'><dir id='mgcQ9'><q id='mgcQ9'></q></dir></style></legend>

                    <tfoot id='mgcQ9'></tfoot>
                      <tbody id='mgcQ9'></tbody>

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

                        • <small id='mgcQ9'></small><noframes id='mgcQ9'>