Code: Select all
"; write_textfile("setup.conf.inc.php", $conf_file); }function aporeplace($string_to_convert="") { //Ändert die einfachen Apostrophe für SQL-Funktionen in doppelte $string_to_convert = str_replace("\\", "\\\\", $string_to_convert); $string_to_convert = str_replace("'", "''", $string_to_convert ); return $string_to_convert;}function html_specialchars($h="") { //used to replace the htmlspecialchars original php function //not compatible with many internation chars like turkish, polish $h = preg_replace("/&(?!#[0-9]+;)/s", '&', $h ); $h = str_replace( "<", "<" , $h ); $h = str_replace( ">", ">" , $h ); $h = str_replace( '"', """, $h ); $h = str_replace( "'", "'", $h ); $h = str_replace( "\\", "\", $h ); return $h;}function readfile_chunked($filename,$retbytes=true) { $chunksize = 1*(1024*1024); // how many bytes per chunk $buffer = ''; $cnt =0; $handle = @fopen($filename, 'rb'); if ($handle === false) { return false; } while (!feof($handle)) { $buffer = @fread($handle, $chunksize); echo $buffer; flush(); if ($retbytes) { $cnt += strlen($buffer); } } $status = @fclose($handle); if ($retbytes && $status) { return $cnt; // return num. bytes delivered like readfile() does. } return $status;}?>