test.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. exit;
  3. /* currently unused.
  4. // capture PHP's default setting (may get overridden in config
  5. $_oc = ini_get('zlib.output_compression');
  6. // allow access only if builder is enabled
  7. require dirname(__FILE__) . '/../config.php';
  8. if (! $min_enableBuilder) {
  9. exit;
  10. }
  11. if (isset($_GET['oc'])) {
  12. header('Content-Type: text/plain');
  13. echo (int)$_oc;
  14. } elseif (isset($_GET['text']) && in_array($_GET['text'], array('js', 'css', 'fake'))) {
  15. ini_set('zlib.output_compression', '0');
  16. $type = ($_GET['text'] == 'js')
  17. ? 'application/x-javascript'
  18. : "text/{$_GET['text']}";
  19. header("Content-Type: {$type}");
  20. echo 'Hello';
  21. } elseif (isset($_GET['docroot'])) {
  22. if (false === realpath($_SERVER['DOCUMENT_ROOT'])) {
  23. echo "<p class=topWarning><strong>realpath(DOCUMENT_ROOT) failed.</strong> You may need "
  24. . "to set \$min_documentRoot manually (hopefully realpath() is not "
  25. . "broken in your environment).</p>";
  26. }
  27. if (0 !== strpos(realpath(__FILE__), realpath($_SERVER['DOCUMENT_ROOT']))) {
  28. echo "<p class=topWarning><strong>DOCUMENT_ROOT doesn't contain this file.</strong> You may "
  29. . " need to set \$min_documentRoot manually</p>";
  30. }
  31. if (isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) {
  32. echo "<p class=topNote><strong>\$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set.</strong> "
  33. . "You may need to set \$min_documentRoot to this in config.php</p>";
  34. }
  35. }
  36. //*/