I have a file called connect.php which provides the details to access a mysql database, it is kept outside of my web directory for security, but I can't get my page to access it using require() or include(). In order to test the cause for this I created a very simple program called Test.php:
<?php
echo "This one works!";
?>
If I place this in my web directory, and call it using:
include('Test.php');
Then it prints the message. If I leave it in the web directory and do an absolute path:
include('/home/eddy/web/html/Test.php');
Then that works to, but if I place it elsewhere and try linking to it:
include('/home/eddy/security/Test.php');
or
include('../../security/Test.php');
Then it does nothing.
echo 'X';
echo include('/home/eddy/security/Test.php');
echo 'Y';
returns 'XY';
I have no error message coming up, I believe the system administrator has turned error warning off for security reasons.
Any ideas?