| Line 40... |
Line 40... |
| 40 |
// Le fichier autoload.inc.php du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application.
|
40 |
// Le fichier autoload.inc.php du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application.
|
| 41 |
// Sinon, rien ne sera chargé.
|
41 |
// Sinon, rien ne sera chargé.
|
| 42 |
// Chemin du fichier chargeant le framework requis
|
42 |
// Chemin du fichier chargeant le framework requis
|
| 43 |
$framework = dirname(__FILE__).DIRECTORY_SEPARATOR.'framework.php';
|
43 |
$framework = dirname(__FILE__).DIRECTORY_SEPARATOR.'framework.php';
|
| 44 |
if (!file_exists($framework)) {
|
44 |
if (!file_exists($framework)) {
|
| 45 |
$e = "Veuillez paramétrer l'emplacement et la version du Framework dans le fichier $framework";
|
45 |
$e = "Veuillez paramétrer l'emplacement et la version du Framework dans le fichier $framework";
|
| 46 |
trigger_error($e, E_USER_ERROR);
|
46 |
trigger_error($e, E_USER_ERROR);
|
| 47 |
} else {
|
47 |
} else {
|
| 48 |
// Inclusion du Framework
|
48 |
// Inclusion du Framework
|
| 49 |
require_once $framework;
|
49 |
require_once $framework;
|
| 50 |
// Ajout d'information concernant cette application
|
50 |
// Ajout d'information concernant cette application
|
| 51 |
Framework::setCheminAppli(__FILE__);// Obligatoire
|
51 |
Framework::setCheminAppli(__FILE__);// Obligatoire
|
| 52 |
Framework::setInfoAppli(Config::get('info'));
|
52 |
Framework::setInfoAppli(Config::get('info'));
|
| Line 53... |
Line 53... |
| 53 |
|
53 |
|
| 54 |
// Initialisation et lancement du serveur
|
54 |
// Initialisation et lancement du serveur
|
| 55 |
$Serveur = new RestServeur();
|
55 |
$Serveur = new RestServeur();
|
| 56 |
$Serveur->executer();
|
- |
|
| 57 |
|
- |
|
| 58 |
// Affiche le temps d'execution du service
|
- |
|
| 59 |
if (isset($_GET['chrono']) && $_GET['chrono'] == 1) {
|
- |
|
| 60 |
$temps_fin = microtime(true);
|
- |
|
| 61 |
echo 'Temps d\'execution : '.round($temps_fin - $temps_debut, 4);
|
- |
|
| 62 |
}
|
56 |
$Serveur->executer();
|
| 63 |
}
|
57 |
}
|
| 64 |
?>
|
58 |
?>
|