common.php 705 B

123456789101112131415161718192021
  1. <?php
  2. if (!defined('IN_SYS')) {
  3. // exit('禁止访问');
  4. header("Location: ../index.php");
  5. exit;
  6. }
  7. /**
  8. * Verify PHP version
  9. */
  10. function getVersion()
  11. {
  12. if ((float)phpversion() < 5.5) {
  13. exit('<center style="font-family:Verdana, Geneva, sans-serif;font-size:14px;margin:10% auto;"><p><b>Oops!</b> There was a problem. Apparently <br/>You are using the php <b>version ' . phpversion() . '</b> a lower version than the one indicated <br/></p><h2>Anake script requires the php version</h2><h1 style="font-size:4em;">5.5.+</h1></center>');
  14. }
  15. }
  16. // Protect the entered data function
  17. function setProtect($var)
  18. {
  19. return htmlentities(htmlspecialchars($var));
  20. }