|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-06-12 07:32 UTC] tobias dot burger at rolmail dot net
Description:
------------
file_exists returns false if the file path is a symlink
Reproduce code:
---------------
# d:\myfolder\test.php
> mklink /D c:\inetpub\wwwroot\myfolder d:\myfolder
file_exists('c:\inetpub\wwwroot\myfolder\test.php')
Expected result:
----------------
true
Actual result:
--------------
false
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 17:00:01 2025 UTC |
c:\php53rc3tsvc9x86> php -r "var_dump(file_exists('news.txt'));" bool(true) c:\php53rc3tsvc9x86> php -r "var_dump(file_exists(realpath('news.txt')));" bool(true) c:\php53rc3tsvc9x86> php -r "var_dump(file_exists(realpath('news123.txt')));" bool(false) same with VC6 builds. I suspect David is right, the console may be run under a user not having the permissions to access c:\inetpub (5.3 has ACL supports now and actually returns the right info).