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

php中mkdir中错误解决

WBOY
Release: 2016-06-13 10:51:56
Original
1238 people have browsed it

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

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

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

return implode('/',$arrNew); 

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template