dtg78700 2014-01-12 13:10
浏览 46
已采纳

找不到openshift php文件(localhost中的语法相同)

The openshift I'm using is a DIY catridge with nginx + php 5.5.8 + phalcon 1.2.4

I have a directory structure as below

website
    public
       index.php
    app
       config
           config.php
           loader.php
           routes.php
           services.php

the problem is in my public/index.php i do

try {
    /**
     * Read the configuration
     */
    if (file_exists(__DIR__ . "/../app/config/config.php"))
    {
        $config = include __DIR__ . "/../app/config/config.php"; 
    }else{
        throw new Exception("Failed to include 'config.php'");
    }

and it failed

Failed to include 'config.php'
#0 {main}

Is this something to do with openshift? cause I'm doing it correct in my localhost(although it is in apache for localhost) The script should load the config.php

(changed from is_file to file_exist as it make more sense)

  • 写回答

3条回答 默认 最新

  • dongyi9484 2014-01-14 20:01
    关注

    openshift does not deny the usage of the config.php file name, make sure you have added it into your git repository and that it is not ignored by any .gitignore files.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退