Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2006
    Location
    Northampton
    Posts
    694
    Tokens
    142

    Default [PHP] Directories

    Hey, I'm currently doing a 'project' for my college, and I need a script which merged with a HTML form could automaticly generate a directory which could later store files as such.

    Not much to offer apart from my gratitude. However I will reward reputation, not much of a reward but 'meh...

    Thank you, James.
    Last edited by JamesRouale; 26-01-2007 at 07:06 PM.
    Good-bye signature, I love <NOT ALLOWED NAME AT ALL> despite the infraction his last name got me.

    Free speech? Not anymore, you gotta' love this forum.

  2. #2
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    As in, create a directory?
    PHP Code:
      mkdir('/somewhere/newdirectory'); 
    You can also specify the mode of the new directory.
    PHP Code:
      mkdir('/somewhere/newdirectory'0755); 
    kinda quit.

  3. #3
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    make.php
    PHP Code:
    <?
    $directory 
    $_POST[directory];
    mkdir('$directory');
    ?>
    HTML Form
    Code:
    <form action="make.php" method="post">
    <input type="text" name="directory"></input>
    <input type="submit" name="submit" value="Make the Directory">
    </form>
    Then type whatever in the textbox
    e.g /robbiegray/isthe/best

  4. #4
    Join Date
    Oct 2006
    Location
    Northampton
    Posts
    694
    Tokens
    142

    Default

    Perfect!

    Thank you, reputation will be awarded as stated, although it doesn't look like Nets needs any more but 'meh.

    Edit'o: Nets I need to spread grr.
    Last edited by JamesRouale; 26-01-2007 at 11:30 PM.
    Good-bye signature, I love <NOT ALLOWED NAME AT ALL> despite the infraction his last name got me.

    Free speech? Not anymore, you gotta' love this forum.

  5. #5
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Make sure you chmod the make file..

  6. #6
    Join Date
    Oct 2006
    Location
    Northampton
    Posts
    694
    Tokens
    142

    Default

    Permission denied?
    Good-bye signature, I love <NOT ALLOWED NAME AT ALL> despite the infraction his last name got me.

    Free speech? Not anymore, you gotta' love this forum.

  7. #7
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    To 777.

  8. #8
    Join Date
    Oct 2006
    Location
    Northampton
    Posts
    694
    Tokens
    142

    Default

    It is...
    Good-bye signature, I love <NOT ALLOWED NAME AT ALL> despite the infraction his last name got me.

    Free speech? Not anymore, you gotta' love this forum.

  9. #9
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    You need to change the mode of the directory you're creating the new directory in. Also, you might want to check that there's only letters and numbers in the folder's name.

    PHP Code:
    function cd($d) {
      
    $rx "/^[a-zA-Z1-9]+$/";
      return 
    preg_match($rx$d);

    kinda quit.

  10. #10
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Make sure your useing the correct abosulte path to the dir you want to create also.

Page 1 of 2 12 LastLast

Posting Permissions

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