[ Index ] |
|
Code source de dotProject 2.1 RC1 |
1 <?php 2 /* $Id: base.php,v 1.1.2.3 2007/01/31 09:36:51 ajdonnison Exp $ */ 3 4 /* {{{ Copyright (c) 2003-2005 The dotProject Development Team <core-developers@dotproject.net> 5 6 This file is part of dotProject. 7 8 dotProject is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2 of the License, or 11 (at your option) any later version. 12 13 dotProject is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with dotProject; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 }}} */ 22 23 global $baseDir; 24 global $baseUrl; 25 26 $baseDir = dirname(__FILE__); 27 28 // automatically define the base url 29 $baseUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://'; 30 $baseUrl .= isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : getenv('HTTP_HOST'); 31 $pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : getenv('PATH_INFO'); 32 if (@$pathInfo) { 33 $baseUrl .= str_replace('\\','/',dirname($pathInfo)); 34 } else { 35 $baseUrl .= str_replace('\\','/', dirname( isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : getenv('SCRIPT_NAME'))); 36 } 37 38 // Defines to deprecate the global baseUrl/baseDir 39 define('DP_BASE_DIR', $baseDir); 40 define('DP_BASE_URL', $baseUrl); 41 42 // required includes for start-up 43 global $dPconfig; 44 $dPconfig = array(); 45 46 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 18 19:46:52 2007 | par Balluche grâce à PHPXref 0.7 |