Skip to content

Instantly share code, notes, and snippets.

@juanlopezdev
Created September 18, 2018 20:48
Show Gist options
  • Save juanlopezdev/5b4cb3455e86458c1a08bc4ce2fe89b8 to your computer and use it in GitHub Desktop.
Save juanlopezdev/5b4cb3455e86458c1a08bc4ce2fe89b8 to your computer and use it in GitHub Desktop.
[Borrar images del servidor por un nombre base] Borra imágenes de un servidor, tomando en cuenta el nombre base #php #utilidades
// Eliminará todos los archivos en un directorio que coincida con un patrón en una línea de código.
array_map('unlink', glob("some/dir/*.txt"));
// Referencia: http://php.net/unlink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment