3

I'm looking to include other folders in my include path for PHP. I've seen this question:

Setting PHP Include Path on a per site basis?

BUT I don't want to replicate the system path (I suppose I could but then it won't update if the system path is updated). What I would rather is to simply have a line which looked like:

ini_set('include_path', ini_get('include_path').$otherpaths);

Will this work, and is there some fundamental readon this is bad?

1
  • oo! A question by altCognito. How exciting. I thought you were only a man of answers. ;) Commented May 5, 2009 at 3:56

1 Answer 1

4

I think you are looking for this: set_include_path

With it, you can do:

set_include_path(get_include_path() . PATH_SEPARATOR . $otherpath);
Sign up to request clarification or add additional context in comments.

1 Comment

Hah, oh, for a while there, I'm slackin'. This qualifies as so simple why not ask? That's why it's here! Good to see you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.