|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-10-06 14:18 UTC] nherdananto at gmail dot com
Description:
------------
is_file() or file_exists() returning false on existing file.
the script is executed about 8x per second and checking a file in a directory filled with 5000 to 30000 files.
for 344000 execution, it fails about 2000 times.
no change on php.ini
Reproduce code:
---------------
$tid = isset( $_GET['tid'] ) ? $_GET['tid'] : "";
$file = "/data/".$tid.".txt";
if(file_exists()) {
echo "1";
} else {
echo "0";
}
Expected result:
----------------
for 344000 execution, it should producing 1 for 344000 times.
Actual result:
--------------
less than 344000 times of 1 echoed.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 00:00:01 2025 UTC |
sorry, wrong code. here's the code $tid = isset( $_GET['tid'] ) ? $_GET['tid'] : ""; $file = "/data/".$tid.".txt"; if(file_exists($file)) { echo "1"; } else { echo "0"; }