Jump to content
Larry Ullman's Book Forums

Php File_Exists Behaving Strangely

Recommended Posts



As noted elsewhere, I have just upgraded to PHP 5.5.3.


A script that previously ran perfectly now does not - specifically the file_exists function does not return the correct result.


Here's my code:

$newname = "../works_of_art/large/" . $savename;
if (!file_exists($newname))
{	// an image file with that name does not exist - OK
The $newname variable has the correct file name in it.


The function return indicates that the file exists when it does not!


Here's my environment:

. Windows 7 Home Premium 64 bit

. Internet Explorer 10

. Firefox 22.0

. Dreamweaver CS5 as the text editor

. XAMPP for Windows 1.8.3 which comprises:

.. Apache 2.4.4

.. PHP 5.5.3

.. MySQL 5.6.11

.. phpMyAdmin 4.0.4



Any guidance will be much appreciated.


Thanks, Necuima

Link to comment
Share on other sites


  • Create New...