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 #10814
    blankprogrower
    Participant

    I needed the same thing for a login site. I needed to create a directory with two variables.

    The $directory is the main folder where I wanted to create another sub-folder with the users license number.

    include_once("../include/session.php");
    
    $lnum = $session->lnum; // Users license number from sessions
    $directory = uploaded_labels; // Name of directory that folder is being created in
    
    if (!file_exists($directory . "/" . $lnum)) {
        mkdir($directory . "/" . $lnum, 0777, true);
    }
    
Viewing 1 post (of 1 total)