I have the following code but it does not seem to be creating a folder at all.
Should I be using is_dir instead of file_exists?
$location = $_SERVER['DOCUMENT_ROOT'].'/_assets/quote/uploads/';
$folderName = $this->quote->getCompanyDetails()->companyName;
$folderName = str_replace(" ", "_", $folderName);
$folderName = strtolower($folderName);
if(!file_exists($folderName))
{
mkdir($location.$folderName, 0777);
}else{