- //按年月日创建目录(PHP代码函数)
- //代码来源:Monxin ./config/functions.php
- function get_date_dir($path){
- $path=trim($path,"/")."/";
- $Y=date("Y");
- $m=date("m");
- $d=date("d");
- if(!is_dir($path.$Y."_".$m)){mkdir($path.$Y."_".$m);}
- if(!is_dir($path.$Y."_".$m."/".$d)){mkdir($path.$Y."_".$m."/".$d);}
- return $path.$Y."_".$m."/".$d."/";
- }
- //该片段来自于http://www.codesnippet.cn/detail/0704201512115.html
来源: http://www.codesnippet.cn/detail/0704201512115.html