W4mp3

PHPCompiler

May 27th, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title><?php echo date("H:i:s")?>|tempEngine Compiler</title>
  5. </head>
  6. <body>
  7. <?php
  8.     $time = -microtime(true);
  9.  
  10.   echo "Start Compiling at ".date("d.m.Y, H:i:s | U")."<br>";
  11.    
  12.     $version = file_get_contents("version.txt");
  13.     $version++;
  14.    
  15.   $dir = array_diff(scandir("src/"), array('..', '.'));
  16.     $out = "// BUILD: $version \n// Compiled: ".date("d.m.Y, H:i:s | U")."\n\nbuild = $version+' | ".date("d.m.y, H:i:s | U")." (PHPCompiler)'\n\n";
  17.     echo "Including Files: <select><option>-=List of included files=-";
  18.     foreach ($dir as $x) {
  19.         echo "<option>".$x."</option>";
  20.         $out .=  "//File: $x\n\n".file_get_contents("src/$x")."\n\n";
  21.     }
  22.     file_put_contents("a.js",$out);
  23.     file_put_contents("version.txt",$version);
  24.     $time += microtime(true);
  25.     echo "</select><br>Script compiled without error! Time: ".round($time,4)." s ; Filesize: ".strlen($out)." bytes<br>";
  26.     echo "<textarea style='width: 100%;height: 512px;'>$out</textarea>";
  27. ?>
  28. </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment