Subversion Repositories eFlore/Projets.communes

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 jpm 1
<?php
2
// Encodage : UTF-8
3
// +-------------------------------------------------------------------------------------------------------------------+
4
/**
5
* Initialise le chargement et l'exécution des scripts
6
*
7
* Lancer ce fichier en ligne de commande avec :
8
* <code>/opt/lampp/bin/php cli.php mon_script -a test</code>
9
*
10
//Auteur original :
11
* @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
12
* @author		Delphine CAUQUIL <delphine@tela-botanica.org>
13
* @copyright	Tela-Botanica 1999-2008
14
* @licence		GPL v3 & CeCILL v2
15
* @version		$Id$
16
*/
17
// +-------------------------------------------------------------------------------------------------------------------+
18
 
19
// Le fichier autoload.inc.php du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application.
20
// Sinon, rien ne sera chargé.
21
// Chemin du fichier chargeant le framework requis
22
$framework = dirname(__FILE__).DIRECTORY_SEPARATOR.'framework.php';
23
if (!file_exists($framework)) {
24
	$e = "Veuillez paramétrer l'emplacement et la version du Framework dans le fichier $framework";
25
	trigger_error($e, E_USER_ERROR);
26
} else {
27
	// Inclusion du Framework
28
	require_once $framework;
29
 
30
	// Ajout d'information concernant cette application
31
	Framework::setCheminAppli(__FILE__);// Obligatoire
32
	Framework::setInfoAppli(Config::get('info'));
33
 
34
	// Initialisation et lancement du script appelé en ligne de commande
35
	Cli::executer();
36
}
37
?>