国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
793B

  1. <?php
  2. if (!defined('DEDEINC')) exit('dedebiz');
  3. /**
  4. *
  5. *
  6. * @version $Id: php.lib.php1 9:29 2010年7月6日Z tianya $
  7. * @package DedeBIZ.Taglib
  8. * @copyright Copyright (c) 2022, DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license
  10. * @link https://www.dedebiz.com
  11. */
  12. function lib_php(&$ctag, &$refObj)
  13. {
  14. global $dsql;
  15. $phpcode = trim($ctag->GetInnerText());
  16. if ($phpcode == '')
  17. return '';
  18. // $error = checkCode($phpcode);
  19. // if ($error) {
  20. // if (DEBUG_LEVEL) {
  21. // echo htmlErrors($error);
  22. // }
  23. // return "";
  24. // }
  25. ob_start();
  26. extract($GLOBALS, EXTR_SKIP);
  27. @eval($phpcode);
  28. $revalue = ob_get_contents();
  29. ob_clean();
  30. return $revalue;
  31. }