创建文件夹时出错
我正在尝试创建这样的文件夹
$destination = "../folder_name/_pcode/../_compile";
mkdir($destination);
但这会出现错误
更新 我正在做的是,将 ../folder_name/_pcode
作为用户的输入,我想在 _pcode
目录之外创建一个文件夹
这是我的错误< /强>
Warning: mkdir() [function.mkdir]: No such file or directory in G:\wamp\www\tools\compile.php on line 57
../folder_name/_pcode/../_compile
I am trying to create folder like this
$destination = "../folder_name/_pcode/../_compile";
mkdir($destination);
But this gives error
UPDATE
What i am doing is, taking ../folder_name/_pcode
as input from user and I want to create a folder outside the _pcode
Directory
Here is my error
Warning: mkdir() [function.mkdir]: No such file or directory in G:\wamp\www\tools\compile.php on line 57
../folder_name/_pcode/../_compile
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能正在尝试在不存在的目录中创建子目录,在这种情况下,如果您想创建整个目录路径,请尝试设置
mkdir
的$recursive
参数设置为true
:It is likely that you're trying to create a subdirectory within a non-existing directory, in this case, if you want to create the whole directory path, try setting
mkdir
's$recursive
parameter totrue
: