check directory is avail or not if not avail create a directory

$dir_exist = true; // flag for checking the directory exist or not
if (!is_dir(IMAGE_UPLOAD_PATH . $domain . ‘/b2c/images/’)) {
mkdir(IMAGE_UPLOAD_PATH . $domain . ‘/b2c/images/’, 0777, true);
$dir_exist = false; // dir not exist
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s