|
From: Benjamin C. <bc...@us...> - 2001-12-24 20:52:54
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv21643
Modified Files:
include.php
Log Message:
Fixes bug #496121 -- not all web servers provide SCRIPT_FILENAME :)
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- include.php 2001/12/24 20:08:39 1.85
+++ include.php 2001/12/24 20:52:50 1.86
@@ -22,7 +22,14 @@
// ------------------------------------------------------------------------
// $Id$
-define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
+// Where are we?
+if (!empty($HTTP_SERVER_VARS['SCRIPT_FILENAME'])) {
+ define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
+} else {
+ define ('INSTALL_PATH', '.');
+}
+
+// Handle being included from admin files
if (!defined('INCLUDE_PATH')) {
define('INCLUDE_PATH', '');
}
|