Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Create a folder if it doesn't already exist #10811
    blankulidu-theerake
    Participant

    Here you go.

    if (!is_dir('path/to/directory')) {
        if (!mkdir('path/to/directory', 0777, true) && !is_dir('path/to/directory')) {
            throw new \RuntimeException(sprintf('Directory "%s" was not created', 'path/to/directory'));
        }
    }
    
Viewing 1 post (of 1 total)