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

Link to comment
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?

 

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.