4-29 3,011 views
<?php
// 文件测试
$array = array(
'001' => '123',
'002' => '321',
'003' => '4321',
);
$path = './Cache/videoCate.php';
if (!file_exists($path)){
mkdir(dirname($path),0777,TRUE);
}
file_put_contents($path, "<?php return \r\n ".var_export($array,TRUE)."; \r\n?>");
$arr = require $path;
var_dump($arr);