|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-04-23 17:02 UTC] atom at suspicious dot org
file_exists () seems to get confused with 'hidden' files, starting with '.' (dot).
this works fine:
--------------------------------------------------------------
if(file_exists(test/normal-file)) {
die ("error message");
}
this does not work:
--------------------------------------------------------------
if(file_exists(test/.hidden-file)) {
die ("error message");
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 11:00:02 2025 UTC |
Usually we like to have more information than 'doesn't work'. :) But for the moment, what happens if you quote your strings? i.e.: if (file_exists('/file/names/must/be/.quoted.txt')) { . . . }Thats it? And what if i got a hidden file name in a $var? Since 2001 no fix? Version: PHP 7.0.8 (cli) (built: Jul 14 2016 00:43:00) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8, Copyright (c) 1999-2016, by Zend Technologies