• Anyone is there !!

    I want to create a plugin named ALBUM.
    So, i have created an admin interface for photo album where album name given by admin or any authenticated user.Then after i will store that name in database as well as create a folder according to that album name.
    So,I can use that folder for slide show of photos at user site in a perticular page.

    But,I have the PROBLEM .i.e-after giving the name of album then it will not create any folder.But giving success message.

    If i will give same name again then it will show ERROR like
    Warning: mkdir() [function.mkdir]: File exists in /var/www/vhosts/sangram.afixiindia.com/san_wp/wp-content/plugins/san_album/san_album.php on line 60
    failure

    If there is no folder displayed to me then how it is shown.

    I have given ownership to mu plugin folder and chmod also.

    Then ,Anybody can help me ??????
    is there any restriction in wordpress to create folder.

    Or Any other way is there.

    MY CODE is:

    $album_name = $_POST[‘album_name’];
    if(mkdir($album_name, 0777))
    echo “success”;
    else
    echo “failure”;

  • The topic ‘Why a folder is not created .’ is closed to new replies.