Current location: Hot Scripts Forums » Programming Languages » PHP » how to create a directory using PHP


how to create a directory using PHP

Reply
  #1 (permalink)  
Old 06-01-04, 06:57 AM
davidklonski davidklonski is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
how to create a directory using PHP

Hi guys

Can anyone tell me whether it is possible to create a directory using PHP, and how to set the permissions for that new directory?
If it is possible, an example would be appreciated.

thanks
Reply With Quote
  #2 (permalink)  
Old 06-01-04, 08:53 AM
MasQ's Avatar
MasQ MasQ is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Norway/Oslo
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Sure...
Just use the mkdir() command...
Like this:
PHP Code:

<?php

mkdir
("/path/to/my/dir"0700);
?>
The number at the end is the number the folder wil be CHMOD'd to...
If you don't know what to CHMOD your dir, read here
__________________
**Schmmotch**
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
create files in php banli PHP 3 10-31-08 09:49 PM
need to how can we create a tree structure in php rani PHP 2 08-29-06 06:12 AM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 06:02 AM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 10:37 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.