Php Mkdir If Not Exists

[Solved] Php Mkdir If Not Exists | Php - Code Explorer | yomemimo.com
Question : create folder php

Answered by : confused-chipmunk-nyedd7qqp54w

// Create folder if not exist	$folderName = 'images/gallery';	$config['upload_path'] = $folderName;	if(!is_dir($folderName))	{	mkdir($folderName, 0777);	}

Source : | Last Update : Wed, 02 Sep 20

Question : php mkdir if not exists

Answered by : dyandro-ivyson

<?php
if (!file_exists('path/to/directory')) {	/** * 0755 - Permission * true - recursive? */ mkdir('path/to/directory', 0755, true);
}

Source : https://stackoverflow.com/questions/2303372/create-a-folder-if-it-doesnt-already-exist | Last Update : Sat, 20 Feb 21

Answers related to php mkdir if not exists

Code Explorer Popular Question For Php