|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-02-03 10:12 UTC] jaenecke@php.net
Description:
------------
It seems that results from file_exists() or similar are not being cached with PHP-CLI. Since I think this is intended behavior this should be reflected in the manual.
Reproduce code:
---------------
while( TRUE ) {
var_dump( file_exists( '/tmp/foo' ) );
sleep( 1 );
}
Expected result:
----------------
on creating/deleting /tmp/foo the result of file_exists() should not change since there is no call to clearstatcache()
Actual result:
--------------
actually the output _does_ change
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 16:00:01 2025 UTC |
I have a similar problem too: ... clearstatcache(); if (file_exists($_SERVER['DOCUMENT_ROOT']."pic/penztarbamost_".$language.".gif")){ ?> <img src="pic/penztarbamost_<?php echo($language); ?>.gif" border="0" alt="<?php echo($_SERVER['DOCUMENT_ROOT']."pic/penztarbamost_".$language.".gif"); ?>"> <?php } ... The code is inserting the img tag, but the image does not exist! (and newer was) I tried to restart apache, but no change. :( (the php script is a symlink, but the alt message on a missing image is correct.) PHP 4.3.6RC2 RH 9.0 Apache 2.0.50