[ Index ]
 

Code source de SPIP Agora 1.4

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

title

Body

[fermer]

/Pear/tests/driver/ -> setup.inc.cvs (source)

   1  <?php
   2  
   3  /*
   4   * This is the original "setup.inc.cvs" file from CVS.
   5   *
   6   * PREPARATION:
   7   *   1) make a copy of this file named "setup.inc"
   8   *   2) edit the DRIVER_DSN's as appropriate for your environment
   9   *   3) comment out the blank DRIVER_DSN
  10   *   4) before each run, uncomment the one DRIVER_DSN you want
  11   *      to use during that run
  12   */
  13  
  14  if (!defined('PATH_SEPARATOR')) {
  15      if (stristr(PHP_OS, 'WIN')) {
  16          define('PATH_SEPARATOR', ';');
  17      } else {
  18          define('PATH_SEPARATOR', ':');
  19      }
  20  }
  21  
  22  /*
  23   * If the path to your PEAR installation is found in the left hand
  24   * portion of the if() expression below, that means this file has
  25   * come from the PEAR installer.  Therefore, let's use the
  26   * installed version of DB, which should be found via the
  27   * computer's default include_path.  Add '.' to the include_path
  28   * to ensure '.' is in there.
  29   * 
  30   * If the path has not been substituted in the if() expression,
  31   * this file has likely come from a CVS checkout or a .tar file.
  32   * Therefore, we'll assume the tests should use the version of
  33   * DB that has come from there as well.
  34   */
  35  if ('@include_path@' != '@'.'include_path'.'@') {
  36      ini_set('include_path', ini_get('include_path')
  37              . PATH_SEPARATOR . '.'
  38      );
  39  } else {
  40      ini_set('include_path', realpath(dirname(__FILE__) . '/../..')
  41              . PATH_SEPARATOR . '.' . PATH_SEPARATOR
  42              . ini_get('include_path')
  43      );
  44  }
  45  
  46  require_once  'DB.php';
  47  
  48  // Options used when connecting
  49  $options = array(
  50      //'optimize' => 'portability',
  51      'portability' => DB_PORTABILITY_ALL,
  52      'debug' => 2,
  53  );
  54  
  55  //define('DRIVER_DSN', 'pgsql://postgres@localhost/test');
  56  //define('DRIVER_DSN', 'mysql://root@localhost/test');
  57  //define('DRIVER_DSN', 'oci8://system:manager@');
  58  //define('DRIVER_DSN', 'ibase(firebird)://SYSDBA:masterkey@//opt/interbase/examples/employee.gdb?dialect=3');
  59  //define('DRIVER_DSN', 'mssql://sa@somehost/pubs');
  60  //define('DRIVER_DSN', 'odbc(db2)://db2inst1:XXXX@/SAMPLE');
  61  //define('DRIVER_DSN', 'sqlite://dummy:@localhost/' . getcwd() . DIRECTORY_SEPARATOR . 'test.db?mode=0644');
  62  
  63  ?>


Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7