Monkuar Posted May 24, 2009 Share Posted May 24, 2009 // Load and Start IPB SDK require_once "/forums/ipbsdk/ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); Ok im editing this: but im putting that inside a directory that's http://talkalot.info/phpfreechat/demo/demo55_mysql_container.php how do i require require_once "/forums/ipbsdk/ipbsdk_class.inc.php"; if im in a different folder directory? Omg this is hard to explain but yea.. xD dont i have to use like /....//forums/ipbsdk/ipbsdk_class.inc.php something like that?to make it go back directorys Link to comment https://forums.phpfreaks.com/topic/159494-solved-php-require-directory-help/ Share on other sites More sharing options...
ToonMariner Posted May 24, 2009 Share Posted May 24, 2009 i always reference includes absolutely so $_SERVER['DOCUMENT_ROOT'] . 'path/to/file.ext' 9obvioulsy check if $_SERVER['DOCUMENT_ROOT'] has the trailing forward slash - if not you'd need '/path...'. In doing so - should you need to move/copy then its straight forward. As you are including a class file - why are you not using the __autoload function? Link to comment https://forums.phpfreaks.com/topic/159494-solved-php-require-directory-help/#findComment-841329 Share on other sites More sharing options...
Monkuar Posted May 24, 2009 Author Share Posted May 24, 2009 i always reference includes absolutely so $_SERVER['DOCUMENT_ROOT'] . 'path/to/file.ext' 9obvioulsy check if $_SERVER['DOCUMENT_ROOT'] has the trailing forward slash - if not you'd need '/path...'. In doing so - should you need to move/copy then its straight forward. As you are including a class file - why are you not using the __autoload function? Script is from 2002. lol Im so lost on what u said could u explain it a little bit more, thanks sir something like this? require_once '$_SERVER['DOCUMENT_ROOT'] . '/forums/ipbsdk/ipbsdk_class.inc.php"; i get error.. ;p Link to comment https://forums.phpfreaks.com/topic/159494-solved-php-require-directory-help/#findComment-841331 Share on other sites More sharing options...
ToonMariner Posted May 24, 2009 Share Posted May 24, 2009 require_once($_SERVER['DOCUMENT_ROOT'] . '/forums/ipbsdk/ipbsdk_class.inc.php'); Link to comment https://forums.phpfreaks.com/topic/159494-solved-php-require-directory-help/#findComment-841332 Share on other sites More sharing options...
Monkuar Posted May 24, 2009 Author Share Posted May 24, 2009 thx u sir resolved. Link to comment https://forums.phpfreaks.com/topic/159494-solved-php-require-directory-help/#findComment-841335 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.