我需要安装两个使用Symfony 1.4开发的不同项目。每个项目都是独立的,具有自己的数据库和配置。我需要以下内容:
/project1/apps
/project1/config
/project1/lib
.
.
.
/project2/apps
/project2/config
/project2/lib
.
.
.
/htdocs/project1/index.php
/htdocs/project2/index.php
我应该如何设置 index.php 和 ProjectConfiguration.class.php 文件,每个项目? 我尝试了几个选项,但没有一个可行。 我尝试的最后一个选项是:
的index.php:
<?php
require_once('/../project1/config/ProjectConfiguration.class.php');
ProjectConfiguration.class.php :
<?php
require_once '/../project1/lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins('sfDoctrinePlugin');
$this->setWebDir($this->getRootDir().'/htdocs/project1');
$this->setCacheDir('/tmp/symfony_cache');
$this->setLogDir('/tmp/symfony_logs');
但它不起作用:
警告:require_once(/../ project1 / config / ProjectConfiguration.class.php):无法打开流:第2行/www/mydomain.com/htdocs/project1/index.php中没有此类文件或目录
致命错误:require_once():无法打开所需的&#39; /../ project1 / config / ProjectConfiguration.class.php&#39;第2行/www/mydomain.com/htdocs/project1/index.php中的(include_path =&#39; ./:/ usr / local / php5.4 / lib / php&#39;)