Jump to content


Photo

mk dir


  • Please log in to reply
2 replies to this topic

#1 feri_soft

feri_soft
  • Members
  • PipPipPip
  • Advanced Member
  • 147 posts

Posted 29 April 2006 - 11:07 AM

Can you give me a script which is doing that:
Checks if the directory exists and if exist i will put the code to apply
if it isn't exist the script will create the category itself.The category will be a variable containing the user name from a query ;)

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 29 April 2006 - 11:16 AM

I can't give you a script, but I can point you to the user notes in the manual for the [a href=\"http://ca.php.net/manual/en/function.mkdir.php\" target=\"_blank\"]mkdir function[/a].

If you're going to allow users to create directories you need to be VERY VERY careful about it!!
Legend has it that reading the manual never killed anyone.
My site

#3 feri_soft

feri_soft
  • Members
  • PipPipPip
  • Advanced Member
  • 147 posts

Posted 29 April 2006 - 11:28 AM

I've seen the manual but i didn't gound any useful think at all.And about the use i want to create a script which uploads files to a certain directory.And the directory have for name the username of a user.The script must check if there is already a category with the name of the uploader and if there isnt it must create one and continue uploading ;)
the other possibility that i have is to create some directories 5-6 but they will have about 200-300 files each and i don't know will that is going to slow down the server much.If you think that it won't i can proceed with the 2-nd method ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users