#file body.html
html;
//$file=file_get_contents("index.html");
$list=explode("#file",$file);
array_shift($list);
foreach($list as $key){
$outfile="";
$filename="";
$outfile=split("\r\n",$key);
$filename=trim($outfile[0]);
$path=pathinfo($filename,PATHINFO_DIRNAME);
if(!empty($path)){
if(!file_exists($path)){
mkdir($path);
}
}
array_shift($outfile);
$outfile=implode("\r\n",$outfile);
file_put_contents($filename,$outfile);
}
echo "done.";
?>
切割标记:#file 文件保存路径