No, that doesn't fix the problem and I tried "%20" as spaces, but that doesn't work too. Here is the source:
<?PHP
$conn_id = ftp_connect("127.0.0.1");
ftp_login($conn_id, "Anonymous", "test");
$Dir = ftp_rawlist($conn_id, "dirname with spaces/");
foreach ($Dir as $item) {
echo "$item\n<br>";
}
?>