时间:2021-07-01 10:21:17 帮助过:36人阅读
$a = array("ccc");
$str = $a[0];
echo $str . "\n";
echo sprintf("data is [%s]\n", $str);
这不奇葩,php 本来就提供有这个功能
$a = array("ccc");$str = '$a[0]';eval("\$b = $str;");echo $b;echo eval("return $str;");//如果 allow_url_include = oninclude "data://," . "= $str?>";
eval 用这个主意安全
$a = array('ccc');$str = $a['0'];echo $str."\n";echo sprintf('%s',$str);