53 lines
1.8 KiB
PHP
53 lines
1.8 KiB
PHP
|
<?php
|
|||
|
/*
|
|||
|
* Remplacement du php_value include_path dans le .htaccess
|
|||
|
* Attention <EFBFBD> bien placer l'include_path dans le php.ini
|
|||
|
* Pour windows/wamp : include_path = ".;c:\wamp\bin\php\php-X.X.X\PEAR"
|
|||
|
* Pour serveur linux : include_path = ".:/usr/share/php"
|
|||
|
*/
|
|||
|
ini_set('include_path',
|
|||
|
ini_get('include_path') . PATH_SEPARATOR .
|
|||
|
realpath(dirname(__FILE__) . '/../framework/') . PATH_SEPARATOR .
|
|||
|
realpath(dirname(__FILE__) . '/../includes/')
|
|||
|
);
|
|||
|
|
|||
|
require_once realpath(dirname(__FILE__)).'/config.inc';
|
|||
|
require_once 'debug/bench.php';
|
|||
|
|
|||
|
//Debuggage
|
|||
|
require_once 'FirePHPCore/FirePHP.class.php';
|
|||
|
ob_start();
|
|||
|
$firephp = FirePHP::getInstance(true);
|
|||
|
|
|||
|
if(ENVIRONNEMENT == 'PRD')
|
|||
|
{
|
|||
|
$firephp->setEnabled(false);
|
|||
|
ini_set('error_reporting', 0);
|
|||
|
}
|
|||
|
elseif(ENVIRONNEMENT == 'DEV')
|
|||
|
{
|
|||
|
$firephp->setEnabled(true); //Debuggage activ<69> par defaut
|
|||
|
//ini_set('error_reporting', E_ALL ^ E_NOTICE);
|
|||
|
}
|
|||
|
|
|||
|
/** On ne prend l'heure qu'une seule fois par script PHP et on initialise des constantes.
|
|||
|
*
|
|||
|
* DATETIME YmdHis
|
|||
|
* DATETIME_LOG Y-m-d H:i:s Date du jour pour les insertions en BDD
|
|||
|
* NOW His Heure d'ex<EFBFBD>cution du script
|
|||
|
* NOW_FORMAT H:i:s Heure d'ex<EFBFBD>cution du script
|
|||
|
* TODAY Ymd Ann<EFBFBD>e, Mois, Jour d'ex<EFBFBD>cution du script
|
|||
|
* TODAY_FORMAT Y-m-d
|
|||
|
* TODAY_AFF d/m/Y
|
|||
|
*/
|
|||
|
define ('DATETIME', date('YmdHis'));
|
|||
|
define ('DATETIME_LOG', substr(DATETIME,0,4).'-'.substr(DATETIME, 4,2).'-'.substr(DATETIME, 6,2).' '.substr(DATETIME,8,2).'-'.substr(DATETIME,10,2).'-'.substr(DATETIME,12,2) );
|
|||
|
define ('TODAY', substr(DATETIME,0,8));
|
|||
|
define ('NOW', substr(DATETIME,8,6));
|
|||
|
define ('TODAY_FORMAT', substr(DATETIME,0,4).'-'.substr(DATETIME,4,2).'-'.substr(DATETIME,6,2));
|
|||
|
define ('TODAY_AFF', substr(DATETIME,6,2).'/'.substr(DATETIME,4,2).'/'.substr(DATETIME,0,4));
|
|||
|
define ('NOW_FORMAT', substr(DATETIME,8,2).':'.substr(DATETIME,10,2).':'.substr(DATETIME,12,2));
|
|||
|
|
|||
|
session_start();
|
|||
|
|
|||
|
?>
|