Re: Problem on file_exists() function

From: Date: Fri, 19 Jul 2002 00:09:36 +0000
Subject: Re: Problem on file_exists() function
Groups: php.general 
Request: Send a blank email to php-general+get-108388@lists.php.net to get a copy of this message
>I had made a test.txt file which stored in the following window path : >c:\pdf_reports\dealing\test.txt, >In my page, i ask php to check the test.txt exist in foler >(c:\pdf_reports\dealing) using the following script: > >if (file_exists("c:\\pdf_reports\\dealing\\test.txt")) > { > print ("exist"); > } >else > { > print ("Doesn't Exist!"); > } > >It seems that php can't detect the file in such path!!! >I had made another test on this, i moved the test.txt to one level up which >is (c:\pdf_reports) and i use the following script : > >if (file_exists("c:\\pdf_reports\\test.txt")) > { > print ("exist"); > } >else > { > print ("Doesn't Exist!"); > } >Then it can detect the file is there! why? What are the exact error messages you get when it's "not there"? Which version of Windoze? Is it one of the ones where you actually have some kind of control over user priveleges on reading/writing directories and files? What permissions are on 'dealing'? Is 'dealing' really 'dealing' or is it 'Dealing', or maybe 'DEALING' or even 'DeAlInG'? :-) I don't think PHP can force Windows to be case-sensitive, but... Also try it with just c:/pdf_reports/dealing/test.txt All those \\ and Windoze crap is ugly anyway. :-) -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#108388) next »