include-path

include_path gets ignored? Or...

Hi all, Recently my ISP added imap functionality to my webserver. After the installation they recompiled PHP. But the hostingclients on my server are including from a specific hostingaccount on the server. By adding an extra include_path to the CMS folder the websites are able to communicate with the CMS and database. The strange thing ...

Why PHP "require" does not find a file ?

I have the following files structure: temp main index.php a.php b.php Here are the files; index.php echo "index.php ---> " . __DIR__ . "<br />"; require('../a.php'); echo "OK<br />" a.php echo "a.php ---> " . __DIR__ . "<br />"; require('./b.php'); echo "a is here<br />" b.php echo "b is here<br />" W...

Need help with PHP "include" - How to save the path to my website in variable ?

I use the following scheme to include PHP files: require($_SERVER['DOCUMENT_ROOT'] . "Path/To/My/Website/Path/To/My/File.php"); I would like to save $_SERVER['DOCUMENT_ROOT'] . 'Path/To/My/Website' in some variable, say $my_website, and write: require("$my_website/Path/To/My/File.php"); This way, if I decide to change the path ...

In Rails, I thought once the "Foo.all" is executed, then "models/foo.rb" is loaded?

In Rails, if I create a scaffold foo, and do rake db:migrate, then now app/models/foo.rb is created. So if I go to script/console (or rails console for Rails 3) and type $".grep /foo/i it is empty. $" is the loaded files. So foo.rb is not loaded yet. Now I do a Foo.all, and foo.rb should be loaded now. But when I repeat ...

Where PHP "set_include_path" is effective ?

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