We need to delete images created in linux file system. in a path /home/user/img/ (All images)
We have tried using unlink() but it is taking lot of time to delete it.
Can someone help us how to delete images using linux commands must be passed with php script. I think rm command can do quickly but i am confused how to use
Our script:
$locationIMG_p="/home/user/img/";
$location_p="/home/user/img/";
$opend=opendir($locationIMG_p);
while(false!==($rf=readdir($opend)))
{
unlink($locationIMG_p.$rf);
}
closedir($opend);