license.php 894 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Simple script to set correct charset for the license
  5. *
  6. * Note: please do not fold this script into a general script
  7. * that would read any file using a GET parameter, it would open a hole
  8. *
  9. * @package PhpMyAdmin
  10. */
  11. use PhpMyAdmin\Response;
  12. /**
  13. * Gets core libraries and defines some variables
  14. */
  15. require 'libraries/common.inc.php';
  16. $response = Response::getInstance();
  17. $response->disable();
  18. /**
  19. *
  20. */
  21. header('Content-type: text/plain; charset=utf-8');
  22. $filename = LICENSE_FILE;
  23. // Check if the file is available, some distributions remove these.
  24. if (@is_readable($filename)) {
  25. readfile($filename);
  26. } else {
  27. printf(
  28. __(
  29. 'The %s file is not available on this system, please visit ' .
  30. '%s for more information.'
  31. ),
  32. $filename,
  33. 'https://www.phpmyadmin.net/'
  34. );
  35. }