Home >Backend Development >PHP Tutorial > 关于这个mkdir()的异常小弟我没想明白

关于这个mkdir()的异常小弟我没想明白

WBOY
WBOYOriginal
2016-06-13 12:32:24905browse

关于这个mkdir()的错误我没想明白

$img = array<br />
(<br />
    "./web/su.bdimg.com/static/superpage/css/../img/spis_9762e054.png",<br />
    "./web/su.bdimg.com/static/superpage/css/../img/baidu_fm_gif_72f357cc.gif",<br />
    "./web/su.bdimg.com/static/superpage/css/../img/guide_sprite_df6dde4a.png",<br />
    "./web/su.bdimg.com/static/superpage/css/../img/cite_sprite_121e6560.png",<br />
    "./web/su.bdimg.com/static/superpage/css/../img/hotnews_ac6c5b7e.png",<br />
    "./web/su.bdimg.com/static/superpage/css/../img/hotnews_ie_ca7d3ffd.png"<br />
);<br />
<br />
foreach($img as $v){<br />
	$a=dirname($v);<br />
	echo $a,'<br/>';<br />
	if(!file_exists($a) && mkdir($a,0777,true)){<br />
		echo $a.'<font color="green">路径创建成功</font><br/>';<br />
	}<br />
}

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