« MySQL的索引是以及数据库索引应用 mysql 5.0存储过程学习总结 »

Discuz!替换extract函数的方法

Discuz!5.5.0中common.inc.php55行左右代码分析如下

对’_COOKIE’, ‘_POST’, ‘_GET’类型的变量数值进行分析并将其用类似extract的将变量从数组中导入到当前的符号表,记录下

  1. foreach(array('_COOKIE', '_POST', '_GET') as $_request) {
  2. foreach($$_request as $_key => $_value) {
  3. $_key{0} != '_' && $$_key = daddslashes($_value);
  4. }
  5. }

回复留言

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

你可以使用XHTML标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>