require_once无法正常工作

时间:2015-08-08 13:00:11

标签: php cron openshift

我使用openshift主机开发我的自定义应用程序。 在此文件夹中:

 /var/lib/openshift/000000000000000000000000/app-root/runtime/repo/php/script.php

我已经放置了我的php文件,每个文件都有一个require_once来包含一些功能。问题是require_once没有看到同一文件夹中的任何文件! 我已经创建了这个脚本:

if(file_exists("tool.php")==TRUE)
{
    file_put_contents(getenv('OPENSHIFT_REPO_DIR').'php/debug.txt', 'exists', FILE_APPEND); 
}
else
{
file_put_contents(getenv('OPENSHIFT_REPO_DIR').'php/debug.txt', "not found", FILE_APPEND);
}

但是在debug.txt文件中我得到了

  

未找到

在我的script.php中我有这个目录:require_once("tool.php"); 我做错了什么?

0 个答案:

没有答案
相关问题