Posted by Jim on 12/06/05 03:35
I have a program that performs an
include("/home/xyz/includes/common.php"); I do this so the include file
(which contains database login information) is outside of the web root
directory and (hopefully) invisible to anyone who might get into the
website. On my home PC running XP and Apache, my PHP.ini include_path
is set to ".;d:\xampp\includes\" and under this directory I have the
directories "home\xyz\includes". This worked fine when running on my
old system using PHP 4.2.2. I recently upgraded to the latest version
of Xampp running PHP 5.0.5 and I now cannot access the include files on
my XP system. If I change the include to remove the leading "/", it
works fine - but will not work on Linux. I understand that this used to
work on older version of Win32 PHP but has been changed. Is there a
way to issue an include that will work on both Linux and XP under the
more recent versions of PHP?
Many thanks. ---Jim
[Back to original message]
|