Replaced file_exists() with stream_resolve_include_path()

* The file_exists() function does not behave properly across symlinks, returning FALSE if the directory permissions while traversing the real path prevent access. This prevents the baseurl.php include file from being included, even though it is present and readable.

(DBOINCP-157)
This commit is contained in:
Tristan Olive 2014-09-16 12:39:34 -04:00
parent 407035a126
commit 7829f70575
1 changed files with 3 additions and 2 deletions

View File

@ -119,8 +119,9 @@ $db_prefix = '';
* for you.
*/
# $base_url = 'http://www.example.com'; // NO trailing slash!
if (file_exists('baseurl.php'))
include_once('baseurl.php');
if (stream_resolve_include_path('baseurl.php')) {
include_once('baseurl.php');
}
/**
* PHP settings: