[ Index ]
 

Code source de PHPonTrax 2.6.6-svn

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/config/ -> boot.php (source)

   1  <?php
   2  /**
   3   *  @package PHPonTrax
   4   *
   5   *  Don't change this file. Configuration is done in
   6   *  config/environment.php and config/environments/*.php
   7   */
   8  
   9  # Determine Trax environment 
  10  if(!defined('TRAX_ENV')) {
  11      # Sets environment from the Apache Vhost (SetEnv TRAX_ENV development)
  12      # or change the string to manually set it. (development | test | production)
  13      define('TRAX_ENV', $_SERVER['TRAX_ENV'] ? $_SERVER['TRAX_ENV'] : "development");
  14  } 
  15  
  16  # Determine the path to this applications trax folder 
  17  if(!defined('TRAX_ROOT')) {
  18      define("TRAX_ROOT", dirname(dirname(__FILE__)));    
  19  }
  20  
  21  # Determine where your system php libs path
  22  if(!defined('PHP_LIB_ROOT')) {
  23      $php_dir = trim(exec('pear config-get php_dir'));
  24      if(is_dir($php_dir)) {
  25          define('PHP_LIB_ROOT',  $php_dir);    
  26      } else {
  27          define('PHP_LIB_ROOT',  '/usr/local/lib/php');    
  28      } 
  29      unset($php_dir);       
  30  }
  31  
  32  # Should we use local copy of the Trax libs in vendor/trax or
  33  # the server Trax libs in the php libs dir defined in PHP_LIB_ROOT
  34  if(is_dir(TRAX_ROOT."/vendor/trax")) {
  35      define("TRAX_LIB_ROOT", TRAX_ROOT."/vendor/trax");
  36  } elseif(is_dir(PHP_LIB_ROOT."/PHPonTrax/vendor/trax")) {
  37      define("TRAX_LIB_ROOT", PHP_LIB_ROOT."/PHPonTrax/vendor/trax");           
  38  } else {
  39      echo "Can't determine where your Trax Libs are located.";
  40      exit;    
  41  }
  42  
  43  # Set up Trax environment, framework, and default configuration
  44  include_once (TRAX_LIB_ROOT."/trax.php");
  45  Trax::initialize();
  46  
  47  ?>


Généré le : Sun Feb 25 20:04:38 2007 par Balluche grâce à PHPXref 0.7