Просмотр поста

.
Homelion

Почему scandir пишет в лог ошибки

$dircopy = 'file/'.$id.'/copy';

if (file_exists($dircopy))
{
  $scd = scandir($dircopy);

for ($c=0; $c < count($scd); $c++){

unlink($dircopy.$scd[$c]);
rmdir('file/'.$id. '/copy');

}}

####удаляем папку $id и файлы в ней###
$dircopy1 = 'file/'.$id;

if (file_exists($dircopy1))
{
 $scd1 = scandir($dircopy1);

  for ($c=0; $c < count($scd1); $c++){

unlink($dircopy1.$scd1[$c]);
rmdir('file/'.$id. '');
 
}}

Хотя все работает