I've got a virtual folder on IIS.
When I do a server document root, I'm not getting file_exists
find the files. But interestingly, if I use include (or require directives for that matter) same files being found.
example
$full_path = $_server['DOCUMENT_ROOT'] . "/file.txt";
include($full_path); // works fine.
if file_exists($full_path) : // returns false!
Again, this is only when I have a virtual folder involved.
I guess I have to use a different server variable which is not effected by whether there is a virtual folder or not.
eventually, I'd like the following to work
/wwwroot/file.txt
should be found with this
file_exists($_server['?'] . "/file.txt")