3
* Copyright Netvibes 2006-2009.
4
* This file is part of Exposition PHP Server.
6
* Exposition PHP Server is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* Exposition PHP Server is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with Exposition PHP Server. If not, see <http://www.gnu.org/licenses/>.
25
// Be strict or be dead
26
error_reporting(E_ALL | E_STRICT);
28
// Active debugging output ?
29
if (false === defined('DEBUG')) {
30
define('DEBUG', false);
33
define('APPLICATION', dirname(__FILE__) . '/../application');
35
if (is_dir(dirname(__FILE__) . '/../lib')) {
36
// Standalone Exposition Server
37
define('EXPOSITION', dirname(__FILE__) . '/../lib/Exposition');
38
define('LIB', dirname(__FILE__) . '/../lib');
39
} else if (is_dir(dirname(__FILE__) . '/../../../libraries')) {
41
define('EXPOSITION', dirname(__FILE__) . '/../../../libraries/php/src');
42
define('LIB', dirname(__FILE__) . '/../../../libraries/php/lib');
44
throw new Exception('The PHP librairies could not be found.');
48
set_include_path(APPLICATION . PATH_SEPARATOR . EXPOSITION . PATH_SEPARATOR . LIB . PATH_SEPARATOR . get_include_path());