Home >php教程 >php手册 >php中mkdir中错误解决

php中mkdir中错误解决

WBOY
WBOYOriginal
2016-06-13 10:51:561238browse

mkdir若上级目录不存在,刚无法创建。此点请注意。我在做王容说的图片上传时浪费时间很多。

第二个知识点:返回文档实际的路径函数:

[php]
function fileDir(){ 
$arr=explode('/',$_SERVER[SCRIPT_FILENAME]); 
for($k=0;$k $arrNew[$k]=$arr[$k]; 

return implode('/',$arrNew); 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn