note 42625 added to function.chmod

From: Date: Mon, 24 May 2004 14:45:42 +0000
Subject: note 42625 added to function.chmod
Groups: php.notes 
Request: Send a blank email to php-notes+get-70021@lists.php.net to get a copy of this message
If you have a mode as a string, chmod will insanely mess up your permissions. Instead of using <?php @chmod($file_or_dir_name, $mode); ?> use <?php @chmod(file_or_dir_name, intval($mode, 8)); ?> where 8 -> the base to convert into. You need octals, baby, for chmod... More on intval here: http://www.php.net/manual/en/function.intval.php ---- Manual Page -- http://www.php.net/manual/en/function.chmod.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42625 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42625&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42625&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70021) next »