您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
631B

  1. <?php
  2. function assertCli()
  3. {
  4. if (php_sapi_name() != 'cli' && !getenv('PHP_IS_CLI')) {
  5. echo 'Script cannot be called from web-browser (if you are indeed calling via cli,
  6. set environment variable PHP_IS_CLI to work around this).';
  7. exit(1);
  8. }
  9. }
  10. function prefix_is($comp, $subject)
  11. {
  12. return strncmp($comp, $subject, strlen($comp)) === 0;
  13. }
  14. function postfix_is($comp, $subject)
  15. {
  16. return strlen($subject) < $comp ? false : substr($subject, -strlen($comp)) === $comp;
  17. }
  18. // Load useful stuff like FSTools
  19. require_once dirname(__FILE__) . '/../extras/HTMLPurifierExtras.auto.php';
  20. // vim: et sw=4 sts=4