Results 1 to 7 of 7

Thread: mkdir() problem

  1. #1

    Thread Starter
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    mkdir() problem

    I am using mkdir() to make a directory, and it works fine, but if i want to delete the directory, it wont let me...

    here is the code i am using:

    PHP Code:
    $dir "pics/$memid/";
    if(!
    is_dir($dir)) {
        
    mkdir($dir0777);

    My usual boring signature: Something

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: mkdir() problem

    I presume you are using rmdir to remove the directory?

    The directory must also be empty before deleting

  3. #3

    Thread Starter
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: mkdir() problem

    well no i am manually deleting them through FTP. I get the error like "You dont have proper authorization to delete these files"

    I cant delete the folder, subfolders or files
    My usual boring signature: Something

  4. #4
    Addicted Member
    Join Date
    May 2006
    Location
    Ithaca, NY
    Posts
    145

    Re: mkdir() problem

    well it sounds like the mode you set didn't take... Perhaps your host doesn't allow chmod?

  5. #5

    Thread Starter
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: mkdir() problem

    well i am sure it does, we are on a Semi-Dedicated Hosting account

    i tried to delete the files with:

    unlink($location);

    and it didnt work either, returned an error
    My usual boring signature: Something

  6. #6
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: mkdir() problem

    is it a unix host?

    either way, this is a permissions issue. nothing php can do to help you! ask your host if they allow chmod and what might be causing an error like that.

  7. #7

    Thread Starter
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: mkdir() problem

    OK thanks guys. I will get back with the answer.
    My usual boring signature: Something

Posting Permissions

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



Click Here to Expand Forum to Full Width