|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-11-04 13:49 UTC] tony2001@php.net
[2004-11-13 01:00 UTC] php-bugs at lists dot php dot net
[2008-08-07 19:12 UTC] vyacheslav dot petrov at yahoo dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 03:00:01 2025 UTC |
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.