Refer to the example below:
$path = "C:/Program Files (x86)/Apache2.2/cgi-bin/myapp/sessiondata_xxx/session_xxx_/../../code/doc/memo/index.csp";
var_dump(is_file($path), realpath($path));
Notes: The folder sessiondata_xxx
and session_xxx_
do not exits.
On Windows, the output is:
TRUE, "C:/Program Files (x86)/Apache2.2/cgi-bin/myapp/code/doc/memo/index.csp"
On Linux, the output is
False, False
So, my question is: Why Windows does not check exists of folders for the relative path?
Thank you in advance.