*** Gordon escribió/wrote (Fri, 1 Aug 2008 01:57:59 -0700 (PDT)):
Is it possible in, say, a .htaccess file, to append additional paths
to the php include_path without knowing what the value of include_path
is beforehand? I want to add an absolute path to a directory and it's
subdirectories from a .htaccess file, but I don't want to have to
encode the entire current value of it and append my own path as that
would mean having to change it every time it changes in php.ini or the
code is deployed on a different server.
You can always do it in PHP itself:
<?php
echo 'Before: ' . ini_get('include_path') . "\n";
include('file_in_foo.php');
ini_set('include_path', ini_get('include_path') . ';C:\\Foo');
echo 'After: ' . ini_get('include_path') . "\n";
include('file_in_foo.php');
?>
If you don't have a general configuration file in your site where you can
place this stuff, you could even use the auto_append_file PHP directive to
automatically include a script.
Just make sure you don't get lost; it happens pretty often with automagic.
--
--
http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
http://bits.demogracia.com
-- Mi web de humor en cubitos:
http://www.demogracia.com
--