I have a folder \folder\ above the webroot that contains .php, .inc, .dat files
-
the
.phpcan access the.incno problem -
but when the
.inctries to access the.datusingfopen('mydat.dat', "rb");it gives an error that it can’t findmydat.datinside\folder\myinc.inc
Of course it can’t find it since .inc is a file not a folder. Why is php treating it as such?
Any ideas why php is trying to find the .dat inside the .inc?
or any other alternatives to fopen($filename, "rb")?
After reading your comments, I think you expect fopen to use the include_path.
fopen() doesn’t use the include_path by default(unlike include). It’s an option. See the manual.
http://www.php.net/manual/en/function.fopen.php