0

I would like to add my_path to include_path and include files relatively to my_path.

Is that enough to set the include_path using set_include_path in the main PHP file of my website, or I must do this in every PHP file ?

Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
  • 1
    why not to ask it as a comment to the answers to your previous question? – Your Common Sense Oct 20 '10 at 12:28
  • possible duplicate of [Need help with PHP "include" - How to save the path to my website in variable ?](http://stackoverflow.com/questions/3976970/need-help-with-php-include-how-to-save-the-path-to-my-website-in-variable) – Your Common Sense Oct 20 '10 at 12:29

1 Answers1

1

You don't have to repeat it for each included file. An alternative approach would be using .htaccess files:

php_value include_path new_path:/old/paths/here
Lekensteyn
  • 64,486
  • 22
  • 159
  • 192