chennaibala Posted October 9, 2009 Share Posted October 9, 2009 hi.. // make a note of the current working directory, relative to root. $directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); // make a note of the directory that will recieve the uploaded files $upDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'upfiles/'; i want to create a sub directory below upfiles directory..thanks in advances.. Link to comment https://forums.phpfreaks.com/topic/177059-how-to-create-a-sub-directory/ Share on other sites More sharing options...
ameyemad Posted October 9, 2009 Share Posted October 9, 2009 Try mkdir(); if (mkdir($upDirectory."new_directory", 0700)){ //your code here... } Is that what you're after? Link to comment https://forums.phpfreaks.com/topic/177059-how-to-create-a-sub-directory/#findComment-933565 Share on other sites More sharing options...
chennaibala Posted October 12, 2009 Author Share Posted October 12, 2009 what is that 0700?wht use of it? Link to comment https://forums.phpfreaks.com/topic/177059-how-to-create-a-sub-directory/#findComment-935273 Share on other sites More sharing options...
Coreye Posted October 12, 2009 Share Posted October 12, 2009 what is that 0700?wht use of it? I would check out mkdir and chmod. The mode is 0777 by default, which means the widest possible access. For more information on modes, read the details on the chmod() page. Link to comment https://forums.phpfreaks.com/topic/177059-how-to-create-a-sub-directory/#findComment-935288 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.