how to use UTF8 character in path Address for Scandir php
my folder name is: 61-تست تست
i have error in scandir and DirectoryIterator.
after change folder name to 61 fix my problem but in need full name.
$folder = '61-تست تست';
$path = 'files/'.$folder;
print_r(scandir($path));
foreach (new \DirectoryIterator($path) as $file) {
if(!$file->isDir())
{
echo $file->getFilename() . "<br>";
}
}
error:
UnexpectedValueException
The system cannot find the file specified. (code: 2)
DirectoryIterator::__construct(D:/wamp64/www/project/web/files/61-تست تست,D:/wamp64/www/project/web/files/61-تست تست): The system cannot find the file specified. (code: 2)