@shaobaobaoer
2018-03-17T10:34:41.000000Z
字数 567
阅读 815
PHP
函数:filetype("C:\\")
该函数能够返回目录dir或者文件file Windows是这样的,linux还不得而知。
function($path){
if(file_exist($url){
echo "not exit";
}
else{
if(filetype($url){
...
}
if(is_writeable($url){
..
}
}
}
常用函数:
x== $url
$path="D:/phpstudy/tmp";
$path="../../tmp";
opendir(路径)打开目录
readdir(opendir(路径)) 遍历目录。 用循环语句
mkdir("xxx")建立xxx的文件