ID: 30564 Updated by: [EMAIL PROTECTED] Reported By: cherub at dagservice dot nl -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Windows XP SP2 PHP Version: 5.0.1 New Comment:
Please provide a complete example script, so we can just run it and see the problem. Previous Comments: ------------------------------------------------------------------------ [2004-10-26 16:40:48] cherub at dagservice dot nl Description: ------------ I used the script below to generate a filename, and check if it already exists useing file_exists (block 1). It generates the following output: "File 'C:\Program Files\Apache Group\Apache2\htdocs\aanleverwizard/temppics/e88d28551c277889a0b34b4b2135d348/pic0.png' does not exist!". However, when I copy/paste this to the windows run dialog, it actually is executed, so the file does exist! I also tried replacing the file_exists function with a replacement function (block 2), but that also doesn't work... Reproduce code: --------------- //BLOCK 1: REPRODUCE FILE_EXISTS BUG $Teller = 0; $TestFile = getcwd(). '/temppics/'. session_id(). '/pic'. $Teller. '.png'; if (file_exists($TestFile)){ echo('File \''. $TestFile. '\' exists!<BR>'); } else { echo('File \''. $TestFile. '\' does not exist!<BR>'); } // BLOCK2: ALTERNATIVE TO FILE_EXISTS FUNCTION if (!function_exists('file_does_exist')){ function file_does_exist($FileName){ if (glob($FileName)){ return true; } else return false; } } Expected result: ---------------- I expect file_exists to return true, but it does not. I did verify that the file does actually exist. Actual result: -------------- // see description. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30564&edit=1