9

I have two folders, Folder and Folderé. The second one could not be catch by PHP.

Here is my test:

<?php
        $dir = 'D:\wamp\www\test\data\Folder';
        var_dump(file_exists($dir)); // true

        $dir = 'D:\wamp\www\test\data\Folderé';
        var_dump(file_exists($dir)); // false
?>

How to fix it?

Shankar Narayana Damodaran
  • 68,075
  • 43
  • 96
  • 126
Syl
  • 2,232
  • 8
  • 34
  • 45

1 Answers1

13

This works like charm

<?php
$dir = 'D:\wamp\www\test\data\Folderé';
var_dump(file_exists((utf8_decode($dir))));
Shankar Narayana Damodaran
  • 68,075
  • 43
  • 96
  • 126