note 48872 added to function.chmod

From: Date: Mon, 10 Jan 2005 09:57:22 +0000
Subject: note 48872 added to function.chmod
Groups: php.notes 
Request: Send a blank email to php-notes+get-83035@lists.php.net to get a copy of this message
If you are having difficulty with your script setting the permissions of a file, make sure that you are actually trying to set the permissions of the file you want. For example, you have to get the full root path to the file in order for it to work.. This applies to unix boxes. <?php if(!chmod(dirname($_SERVER['SCRIPT_FILENAME'])."/". $file,0777)){echo "Can't chmod $file";} ?> ---- Manual Page -- http://www.php.net/manual/en/function.chmod.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48872 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48872&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48872&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48872&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48872&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48872&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48872&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48872&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83035) next »