如何将打印出的数组转换成php代码:

$code = var_export($array,true);
$code = “<?phpn return ” . preg_replace(‘/stdClass::__set_state/’, ‘(object)’, $code) . ‘;’;
file_put_contents(__DIR__ . ‘/data.array.php’, $code);

www.npspro.cn软师兄
软师兄 » WordPress 将数组转换成代码
50T免费网盘资源大集合【持续更中~~~~】:点击查看