¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.
JScms_remove_files_except
The JScms_remove_files_except
function removes all files from a directory except for index.html
.
JScms_remove_files_except($directory)
$directory
: (string) The directory path to clean.(void) This function does not return a value. It operates directly on the filesystem.
<?php
JScms_remove_files_except("/var/www/uploads");
echo "Files removed, except index.html.";
?>
$directory
parameter points to a valid path.