PDA

View Full Version : Create Directory


weronpc
06-05-2003, 06:26 PM
Do anyone know how to use php to create a directory?

I want to create a site for user to store files in his or her account, but i don't know how to use php make a directory for user to orgainze his or her files.

I installed php apache and mysql on Window XP Professional.

thanx

scroots
06-05-2003, 06:40 PM
www.php.net/manual/en/

look under mkdir in functions.

scroots

pardicity3
06-05-2003, 06:41 PM
Got this from http://www.php.net/manual/en/function.mkdir.php :

int mkdir ( string pathname [, int mode])
mkdir ("/path/to/my/dir", 0700);
The mode is 0777 by default, which means the widest possible access.

<edit>It appears scroots was too fast for me :)</edit>

weronpc
06-05-2003, 07:01 PM
I know there is number at the end, but on the www.php.net page says

Note: Mode is ignored on Windows, and became optional in PHP 4.2.0.

I don't think I need the number anymore?

Also says

The mode is also modified by the current umask, what is umask??

Nightfire
06-05-2003, 08:30 PM
chmod'ing (the numbers) is for unix only, for a windows machine you can ignore that