Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End mkdir();

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25394
    AlCapone
    Participant

    Hello, i’m trying to create a folder on my server for users as they register, i did some research and found that mkdir seems to be the function that will get this to happen, the problem is that i have no idea how to use it, i looked at the php docs o manual website but i couldnt understnd what everyone was talking about, prehaps someone here can help me.

    Many Thanks
    Chris

    #60471
    Rob MacKay
    Participant

    *stabs in the dark*

    <?php mkdir( "myFolder", ‘0777’ ); ?>

    this should make a dir called myFolder in probably your root of where this file is ran from – it will give it the folder CHMOD of 0777 which is like read write everyone party time. lol

    do you want to trigger it when something happens? what do you actually want to do?

    #60514
    AlCapone
    Participant

    i wanted to create the folder when the person finishes registering with the site, the folder is their name and then I will use php to create some files inside the folder.

    I think your reply helps – I just wanted to know how you use the function.

    Many THanks
    Chris

    #60562
    Rob MacKay
    Participant

    ahh cool

    yea I would think it would be something like

    mkdir(‘users/’ . $username, 0777);

    obviously you can pull in the username from whatever they registered, although you might have to do some funky stuff like taking out chars and whatever.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.