note 16412 rejected from function.mkdir by zak

From: Date: Mon, 29 Oct 2001 09:42:37 +0000
Subject: note 16412 rejected from function.mkdir by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19565@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...

« previous php.notes (#19565) next »