Godaddy Hack Fix
Transcript of Godaddy Hack Fix
-
8/6/2019 Godaddy Hack Fix
1/3
-
8/6/2019 Godaddy Hack Fix
2/3
}return $files;
}
function print_files( $files ) {if ( count($files) > 0 ) {
foreach ( $files as $file ) {
if ( is_array($file) ) {print_files($file);
}else {
echo $file . '
';}}}
}
function fix_files( $files ) {foreach ( $files as $file ) {
if ( is_array($file) ) {fix_files($file);}else {
$contents = explode("\n", file_get_contents($file));unset($contents[0]);$f = fopen($file, 'w');if ( $f ) {
$the_content = implode($contents, "\n");fwrite($f, $the_content, strlen($the_content));fclose($f);echo "Removed first line containing
-
8/6/2019 Godaddy Hack Fix
3/3
Fix files: