zoukankan      html  css  js  c++  java
  • Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php'

    <?php

    function add_include_path ($path)
    {
        foreach (func_get_args() AS $path)
        {
            if (!file_exists($path) OR (file_exists($path) && filetype($path) !== 'dir'))
            {
                trigger_error("Include path '{$path}' not exists", E_USER_WARNING);
                continue;
            }

            $paths = explode(PATH_SEPARATOR, get_include_path());

            if (array_search($path, $paths) === false)
                array_push($paths, $path);

            set_include_path(implode(PATH_SEPARATOR, $paths));
        }
    }

    function remove_include_path ($path)
    {
        foreach (func_get_args() AS $path)
        {
            $paths = explode(PATH_SEPARATOR, get_include_path());

            if (($k = array_search($path, $paths)) !== false)
                unset($paths[$k]);
            else
                continue;

            if (!count($paths))
            {
                trigger_error("Include path '{$path}' can not be removed because it is the only", E_USER_NOTICE);
                continue;
            }

            set_include_path(implode(PATH_SEPARATOR, $paths));
        }
    }

    ?>

    //以上


    <?php

    // Define path to application directory
    defined('APPLICATION_PATH')
        || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        get_include_path(),
    )));

    //之间
    $path = "http://www.cnblogs.com/.metadata/.plugins/org.zend.php.framework.resource/resources/ZendFramework-1/library";
    add_include_path($path);

    //之间


    /** Zend_Application */
    require_once 'Zend/Application.php';

    // Create application, bootstrap, and run
    $application = new Zend_Application(
        APPLICATION_ENV,
        APPLICATION_PATH . '/configs/application.ini'
    );
    $application->bootstrap()
                ->run();

  • 相关阅读:
    01-2-SpringMVC-为Myeclipse安装spring的插件
    01-1-SpringMVC-怎么从官网下载Spring的jar包
    01-SpringMVC-HelloWorld
    1-2 如何将主机WIN7中文件共享到虚拟机中的Mac中
    1-1 win7 vmware虚拟机 中 mac系统无法上网
    1 在虚拟机上安装Mac OS
    10_mybatis与Spring的整合
    ReadWriteLock锁的应用
    ArrayList类的不安全性 以及 CopyOnWriteArrayList 类的引入
    洛谷P1129 [ZJOI2007]矩阵游戏(二分图匹配)
  • 原文地址:https://www.cnblogs.com/frankyang2014/p/2590974.html
Copyright © 2011-2022 走看看