getTheme(); $assistant->getDefines(); $assistant->getPlugins(); $assistant->getUserini(); $assistant->getPHPErrorsLog(); $assistant->getDebugLog(); $assistant->getAppSettings(); //Output to screen $output = ob_get_contents(); ob_end_clean(); echo $output; //Save the File $f = fopen($location.$assistant->logFile, "w"); fwrite($f, $output); fclose($f); } function azasa_myTail($filename, $lines = 25, $buffer = 4096) { $f = fopen($filename, "rb"); fseek($f, -1, SEEK_END); if(fread($f, 1) != "\n") $lines -= 1; $output = ''; $chunk = ''; while(ftell($f) > 0 && $lines >= 0) { $seek = min(ftell($f), $buffer); fseek($f, -$seek, SEEK_CUR); $output = ($chunk = fread($f, $seek)).$output; fseek($f, -mb_strlen($chunk, '8bit'), SEEK_CUR); $lines -= substr_count($chunk, "\n"); } while($lines++ < 0) { $output = substr($output, strpos($output, "\n") + 1); } fclose($f); return $output; }