Jump to content

Why mkdir() function not working


egturnkey

Recommended Posts

 

Hello Dear Friend,

 

here i get that error

 

Warning: mkdir() [function.mkdir]: No such file or directory in /hermes/web08/b1256/moo.faridaed/common/common.php on line 389

 

and here is the common.php code

 

// create writable directory or change the chmod permission of chosen directory
function check_dir($dir) {

if (!file_exists($dir)) {
	 if (mkdir($dir, 0777))// create images dir
		$done = true;

} else if (!is_writeable($dir)) {
	if (chmod($dir, 0777)) // change perm. setting
		$done = true;

} else
	$done = true;

return $done;
}

 

it should create a file where an images will goes

at following path  products/images/

i've giveen /products/ and  /images/ CHMOOD 777

and still getting the error  :chomp:

 

thanks so much for helping me

 

 

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.