Jump to content

[SOLVED] php require directory help :)


Monkuar

Recommended Posts

// 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

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?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.