-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincludes.php
40 lines (36 loc) · 1.41 KB
/
includes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
set_include_path('.' . PATH_SEPARATOR . './library'
. PATH_SEPARATOR . '../ZendFramework-1.6.2/library'
. PATH_SEPARATOR . get_include_path());
// Includes de base
include_once "local.php";
$site= substr($_SERVER['SCRIPT_NAME'], 1, strpos($_SERVER['SCRIPT_NAME'], "index.php") -2);
$parts=explode('/', $site);
if(!file_exists("../" . end($parts))) {
echo "Erreur de vhost !" ;
exit ;
}
define("BASE_URL", "/" . $site) ;
include_once "fonctions/fonctions.php";
require_once "Zend/Loader.php";
require_once "library/startup.php";
?>