mkdir()不起作用 [英] mkdir() not working

查看:413
本文介绍了mkdir()不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码

mkdir("/some/absolute/path",0777);

mkdir("relative/path", 0777);

不起作用,安全模式已关闭,我什至尝试将所有父文件夹设置为777.

is not working, safe mode is turned off, and I've even tried setting all of the parent folders to 777.

有什么想法吗?

我确实打开了错误报告功能,很沮丧的是,我已经对整个路径进行了777处理,只是为了确保这不是问题.这一定是一件非常简单的事情.

I do have error reporting turned on, in my frustration I've 777'd the whole path just to make sure that, that isn't the issue. It's gotta be something stupidly simple going on.

编辑对所有提出建议的人都表示支持...但是我不会选择答案,因为这仍然无法解决,但是我想这将是那些尚未解决的问题之一永远.

EDIT Upvotes for everyone who responded with suggestions... But I'm not going to select an answer since this still isn't resolved, but then again I think this is going to be one of those ones left open forever.

编辑x 3:所以我对这个问题的解决方案最不满意...我从干净的VM映像开始,重试了它,现在可以正常工作了.别开玩笑了.

EDIT x 3: So I have the most unsatisfactory resolution to this question ever... I started with a clean VM image, retried it and it works now. No joke.

推荐答案

您在路径名参数周围缺少引号.

You're missing quotes around the path name parameter.

这篇关于mkdir()不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆