Try this, using mkdir:
if (!file_exists('path/to/directory')) {
mkdir('path/to/directory', 0777, true);
}
Note that 0777
is already the default mode for directories and may still be modified by the current umask.
Try this, using mkdir:
if (!file_exists('path/to/directory')) {
mkdir('path/to/directory', 0777, true);
}
Note that 0777
is already the default mode for directories and may still be modified by the current umask.
How to pass an array within a query string?
Insert new item in array on any position in PHP
How to check whether an array is empty using PHP?
Converting an integer to a string in PHP
How can I add elements to an empty array in PHP?
How to find the foreach index?
How can I capture the result of var_dump to a string?
How do I pass variables and data from PHP to JavaScript?