php 怎样创建文件夹,并向夹中写入文件
来源:百度知道 编辑:UC知道 时间:2024/06/05 05:21:37
function createFolder($path)
{
if (!file_exists($path))
{
createFolder(dirname($path));
mkdir($path, 0777);
}
}
createFolder("c:\web\ab");
再写入文件,
$ft=fopen("c:\web\ab\kk.txt",+a);
fwrite($ft,"这就是我写的内容");
fclose($ft);