Jump to content

Recommended Posts

I've been having some troubles figuring out why the mkdir command doesn't work... 

currently have php5.0 installed and I am trying to do the command via a web-script.  Below is the past of the data.  Any ideas why the mkdir function is always returning false? (permissions are 775)

 

$mydir = $_POST['directoryname'];
if (mkdir($mydir, 0755)) {
   echo "success";
}else{
   echo "failed";
}

 

I've tried just a straight  mkdir('testing', 0755);  and it also didn't work... not sure what is going wrong here.

Link to comment
https://forums.phpfreaks.com/topic/51449-solved-mkdir-troubles/
Share on other sites

found the problem... it was in permissions.  the parent folder had the wrong permissions ...  ah.. need sleep... 

however, still not sure why this didn't show up with the errors on, but anyway, it works now... will look more in the am.  marking as [solved - PMFI]  Problem magically fixed itself

Link to comment
https://forums.phpfreaks.com/topic/51449-solved-mkdir-troubles/#findComment-253396
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.