note 16411 deleted from function.mkdir by zak
| From: | zak@php.net | Date: | Mon, 29 Oct 2001 09:42:30 +0000 |
| Subject: | note 16411 deleted from function.mkdir by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19564@lists.php.net to get a copy of this message | ||
Hi,
I saw that moast people are talking about permissions like: 0777. But i'm wondering...
doesn't the logics of binary calculatings says that 0 decimal is equal to 0 binary? So you
might as well leave it away?
Here's my contribution:
function create_folder($path){
switch(PHP_OS){
case("WIN32"):
$rights = 764 ;
break;
case("Linux"):
$rights = 777 ;
break;
}
if(!@is_dir($path)){
$create_folder = mkdir($path, @$rights);
if(!$create_folder) die("Failed Creating folder '$path'");
}
Greetings,
Vincent
PHP is my guiding light, php.net the bible...