<?php // this script will delete all your php.ini files // full path to the location of your home directory $path = "/home/" . get_current_user() . "/public_html"; // change nothing below this line function search($dir) { foreach(scandir($dir) as $filename) { if ( $filename !== '.' AND $filename !== '..' AND is_dir("$dir/$filename") ) { $path = $dir."/".$filename; $target = $path . "/php.ini"; if (file_exists($target)) { if (unlink($target)) echo "Deleted - $target <br>"; else echo "<b>Delete failed for $target </b><br>"; } search($path); } } } $target = $path . "/php.ini"; if (file_exists($target)) { echo "Deleting - $target <br>"; if (!unlink($target)) echo "<b>Delete failed for $target </b><br>"; } search($path); echo "<br>Done."; ?>