php写入文本,文件夹不存在则创建
时间:2021-04-29 11:54:35
收藏:0
阅读:0
// 安全文件路径,$fileName:完成文件路径 function securityFilePath($fileName,$read_write = ‘0777‘){ $path = dirname($fileName); if(!file_exists($path)){// 判断路径是否存在,如果不存在则mkdir创建,并写入权限 mkdir ($path,$read_write,true); } }
评论(0)