看这段简单的代码?
session_start();
$globals = array($_REQUEST, $_SESSION, $_SERVER, $_FILES);
foreach ($globals as $global) {
foreach(array_keys($global) as $key) {
unset(${$key}); //这行是什么意思,就是那个${$key} 高手来看看
}
}
------解决思路----------------------
查看手册:变量的变量
------解决思路----------------------
<br />$key = "heh";<br />$heh ="woshi";<br />echo $$key;<br />//输出 woshi<br />
<br />$a='abc';<br />$abc='def';<br />echo $$a;<br />