protected function uploadFile () : bool
	{
		// Determine the destination
		$this->newFileLocation = $this->getUploadDir().$this->uploadFileDir.getConstant('DS', TRUE).$this->newFileName;			  
		// Make sure a file doesn't already exist in the target location
		if (file_exists($this->newFileLocation)):
			$this->error = "The file {$this->newFileLocation} already exists.";
			return FALSE;
		endif;
		// Attempt to move/upload the file 
		if (!move_uploaded_file($this->tempPath, $this->newFileLocation)):
			// File was not moved - failure.
			$this->error = "The file upload failed.";
			return FALSE;
		endif;
		// SUCCESS
		return TRUE;
	}
protected function uploadFile () : bool
	{
		// Determine the destination
		$this->newFileLocation = $this->getUploadDir().$this->uploadFileDir.getConstant('DS', TRUE).$this->newFileName;			  
		// Make sure a file doesn't already exist in the target location
		if (file_exists($this->newFileLocation)):
			$this->error = "The file {$this->newFileLocation} already exists.";
			return FALSE;
		endif;
		// Attempt to move/upload the file 
		if (!move_uploaded_file($this->tempPath, $this->newFileLocation)):
			// File was not moved - failure.
			$this->error = "The file upload failed.";
			return FALSE;
		endif;
		// SUCCESS
		return TRUE;
	}
protected function uploadFile ( ) : bool { // Determine the destination $ this -> newFileLocation = $ this -> getUploadDir ( ) . $ this -> uploadFileDir . getConstant ( 'DS' , TRUE ) . $ this -> newFileName ; // Make sure a file doesn't already exist in the target location if ( file_exists ( $ this -> newFileLocation ) ) : $ this -> error = "The file {$this->newFileLocation} already exists." ; return FALSE ; endif ; // Attempt to move/upload the file  if ( ! move_uploaded_file ( $ this -> tempPath , $ this -> newFileLocation ) ) : // File was not moved - failure. $ this -> error = "The file upload failed." ; return FALSE ; endif ; // SUCCESS return TRUE ; }
Uploads file to detected destination
@return bool
Uploads file to detected destination