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
https://forums.phpfreaks.com/topic/222749-mkdir-error/
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
https://forums.phpfreaks.com/topic/222749-mkdir-error/#findComment-1151859
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
https://forums.phpfreaks.com/topic/222749-mkdir-error/#findComment-1151861
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.