$path = "static/test/".date("Y").date("m").date("d")."/"; 这个是路径 if(!file_exists($path)) 递归无限制创建文件夹 { mkdir($path,0777,true); } $filename = "test".$first[0]["id"]."php"; 文件名 $size = file_put_contents($path.$filename,json_encode($first));
php 将数据写入文件
最新推荐文章于 2024-04-15 05:00:00 发布