Jump to content

mkdir error


fizzzgigg

Recommended Posts

Okay I finally got some bugs worked out, but after further testing I found new bugs.

 

The variables $loggedinid and $pid are working. I am receiving the following error:

 

"An error occured:

Warning: mkdir() [function.mkdir]: No such file or directory in D:\Hosting\5366560\html\file_upload\server\script.php on line 131"

 

Now when I go to line 131 in script.php

mkdir("../uploads/$loggedinid/$pid", 0777);

 

What should my next step be? I am not sure where to start.

 

Adam

Link to comment
Share on other sites

A quick thought to add...

There is the uploads folder, but there is no folder for $loggedinid nor $pid. Could this error be the result that it needs to actually make two folders. 1st being for $loggedinid and the sub-folder to that would be for $pid.

 

If this is a possibilitity how would I create two folders...? as in do two commands for mkdir?

 

Adam

Link to comment
Share on other sites

I don't know what you're trying to do, but I'm guessing you're going to want to create the directory if it doesn't exist. You'll need to do each directory one-by-one, so do a check first for the $loggedinid, then the $pid and create as you go.

 

So you'll do a file_exists check first of that directory and if it's false, then do mkdir to create it.

Link to comment
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.