Good day.
On the server is the img directory, in this directory the downloaded images for processing, the file extension that users upload there .jpg .Jpg .png .PNG .gif, etc.
When I run the code:
if (file_exists('./img')) foreach (glob('./img/*') as $file) unlink($file); echo("Файлы каталога успешно удалены, обновите страницу"); all files in the img directory are deleted.
Question: how to change this code so that the files specified by me are not deleted, for example:
- load.gif
- .htaccess