无法使用Filezilla删除文件


Cannot delete files with Filezilla

有一次我写了一个PHP脚本,应该已经将一些图像下载到一个普通的Web服务器上。这个脚本出了问题,现在我在一个文件大小为0的目录中有很多文件。当我试图用filezilla删除一个时,服务器只响应:

550 nameOfTheFile.jpg: No file or directory

我能做些什么来清除这些数据垃圾?

服务器上似乎只保存了文件名,但没有保存

文件

这是我在这里找到的一段代码

根据原始评论

<?php
$dir_stack = array('test/'); // put the directory to delete here **NOTE** everything in this will be deleted.
$i = 0;
while ($i <= count($dir_stack)-1)
{
    echo $dir_stack[$i].'<br>';
    if ($dir = opendir($dir_stack[$i]))
    {
        while (false !== ($file = readdir($dir)))
        {
            if ($file != "." && $file != ".." && false == is_dir($dir_stack[$i].$file))
            {
                unlink($dir_stack[$i].$file);
            }
            elseif ($file != "." && $file != "..")
            {
                array_push($dir_stack,$dir_stack[$i].$file.'/');
            }
        }
        closedir($dir);
    }
    $i++;
}
$i = count($dir_stack)-1;
while ($i >= 0)
{
    rmdir($dir_stack[$i]);
    $i--;
}
?>

这是我发现的代码,令人惊讶的是它能在中工作

<?php
$dir_stack = array('filedirectory'); // put the directory to delete here **NOTE** everything in this will be deleted.
$i = 0;
while ($i <= count($dir_stack)-1)
{
    echo $dir_stack[$i].'<br>';
    if ($dir = opendir($dir_stack[$i]))
    {
        while (false !== ($file = readdir($dir)))
        {
            if ($file != "." && $file != ".." && false == is_dir($dir_stack[$i].$file))
            {
                unlink($dir_stack[$i].$file);
            }
            elseif ($file != "." && $file != "..")
            {
                array_push($dir_stack,$dir_stack[$i].$file.'/');
            }
        }
        closedir($dir);
    }
    $i++;
}
$i = count($dir_stack)-1;
while ($i >= 0)
{
    rmdir($dir_stack[$i]);
    $i--;
}
?>