I have a code which read FTP dir with directories with names such as (example):
"John_Trumph_USA_bb44cc"
code:
$dh = opendir("ftp://10.200.1.1/rt");
while($filename = readdir($dh))
{
echo " ".$filename."\n <br>";
?>
But in final result I have only:
"_Trumph_USA_bb44cc"
Where is the first word "John"?
setlocale(LC_ALL, 'US');. In second parameter put your files encoding.setlocalefixed your problem? @Pavel