reverting "use XMPPHP/ folder instead of dirname(__FILE__) which is inefficient"

method whis relative path not work for lib - random current dir
dirname faster and not need change include_path

more info on
http://stackoverflow.com/questions/2220443/whats-better-of-requiredirname-file-myparent-php-than-just-require
This commit is contained in:
Ivan Borzenkov 2010-03-07 22:38:11 +03:00
parent 7f28fd2a49
commit 43b4bc94ab
8 changed files with 11 additions and 11 deletions

View File

@ -27,7 +27,7 @@
*/ */
/** XMPPHP_XMLStream */ /** XMPPHP_XMLStream */
require_once 'XMPPHP/XMPP.php'; require_once dirname(__FILE__) . '/XMPP.php';
/** /**
* XMPPHP Main Class * XMPPHP Main Class

View File

@ -27,13 +27,13 @@
*/ */
/** XMPPHP_Exception */ /** XMPPHP_Exception */
require_once 'XMPPHP/Exception.php'; require_once dirname(__FILE__) . '/Exception.php';
/** XMPPHP_XMLObj */ /** XMPPHP_XMLObj */
require_once 'XMPPHP/XMLObj.php'; require_once dirname(__FILE__) . '/XMLObj.php';
/** XMPPHP_Log */ /** XMPPHP_Log */
require_once 'XMPPHP/Log.php'; require_once dirname(__FILE__) . '/Log.php';
/** /**
* XMPPHP XML Stream * XMPPHP XML Stream

View File

@ -27,8 +27,8 @@
*/ */
/** XMPPHP_XMLStream */ /** XMPPHP_XMLStream */
require_once 'XMPPHP/XMLStream.php'; require_once dirname(__FILE__) . '/XMLStream.php';
require_once 'XMPPHP/Roster.php'; require_once dirname(__FILE__) . '/Roster.php';
/** /**
* XMPPHP Main Class * XMPPHP Main Class

View File

@ -33,7 +33,7 @@
* The old Jabber protocol wasn't standardized, so use at your own risk. * The old Jabber protocol wasn't standardized, so use at your own risk.
* *
*/ */
require_once "XMPP.php"; require_once dirname(__FILE__) . '/XMPP.php';
class XMPPHP_XMPPOld extends XMPPHP_XMPP { class XMPPHP_XMPPOld extends XMPPHP_XMPP {
/** /**

View File

@ -3,7 +3,7 @@
// activate full error reporting // activate full error reporting
//error_reporting(E_ALL & E_STRICT); //error_reporting(E_ALL & E_STRICT);
include 'XMPPHP/XMPP.php'; include dirname(dirname(__FILE__)).'/XMPPHP/XMPP.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports #Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6? #If this doesn't work, are you running 64-bit PHP with < 5.2.6?

View File

@ -3,7 +3,7 @@
// activate full error reporting // activate full error reporting
//error_reporting(E_ALL & E_STRICT); //error_reporting(E_ALL & E_STRICT);
include 'XMPPHP/BOSH.php'; include dirname(dirname(__FILE__)).'/XMPPHP/BOSH.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports #Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6? #If this doesn't work, are you running 64-bit PHP with < 5.2.6?

View File

@ -3,7 +3,7 @@
// activate full error reporting // activate full error reporting
//error_reporting(E_ALL & E_STRICT); //error_reporting(E_ALL & E_STRICT);
include 'XMPPHP/XMPP.php'; include dirname(dirname(__FILE__)).'/XMPPHP/XMPP.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports #Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6? #If this doesn't work, are you running 64-bit PHP with < 5.2.6?

View File

@ -4,7 +4,7 @@ header('content-type', 'plain/text');
// activate full error reporting // activate full error reporting
//error_reporting(E_ALL & E_STRICT); //error_reporting(E_ALL & E_STRICT);
include 'XMPPHP/BOSH.php'; include dirname(dirname(__FILE__)).'/XMPPHP/BOSH.php';
print "<pre>"; print "<pre>";
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports #Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports