www.webdeveloper.com
Results 1 to 4 of 4

Thread: File Folders

  1. #1
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197

    File Folders

    Hi

    I have been searching for a tutorial that will give me some guidance on creating a file folder system for my my members.

    The initial folder in the root directory will be called memberPhots.

    With in this folder each member will have a subfolder created for them. The folder name will be their username.

    Next I want to give members the ability to create additional subfolders in thier folder.

    Hope this makes sense. If any one can point me to information to get me started. that would be excellent
    Kevin

  2. #2
    Join Date
    Mar 2007
    Posts
    151
    mkdir

    Also, read up on isdir

    You will need something like this:

    PHP Code:

    //very simplified!

    $new_dir 'path/' $username;

    if (!
    isdir($new_dir) {
    mkdir($new_dir) ;

    TC
    "In retrospect it becomes clear that hindsight is definitely overrated!" ~ Alfred E. Neuman

    http://tcallaway.com

  3. #3
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197
    thank you for the post, this is my first time tying to setup a directory system. I did some google searching and have not come across a tutorial that show how to do this.

    any further pointers are excellent
    Kevin

  4. #4
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197
    this is what i have this far but I'm getting an error message



    Warning: mkdir() [function.mkdir]: File exists in /mnt/w0400/d11/s01/b02a5c57/www/familyclick.ca/FileSysem.php on line 15

    any ideas
    PHP Code:
    <?php
    //very simplified!
    $subFolderName $_POST['subFolderName'];

    if(isset(
    $_POST['subFolderName'])){

    $user_name 'proctk';
    $file_folder 'user_images/'.$user_name.'/'.$subFolderName;

    mkdir($file_folder);

    }
    ?>
    Kevin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles