note 54824 added to function.chmod

From: Date: Sat, 16 Jul 2005 06:26:45 +0000
Subject: note 54824 added to function.chmod
Groups: php.notes 
Request: Send a blank email to php-notes+get-92048@lists.php.net to get a copy of this message
I was trying to chmod files to a chmod I got from a form, and spent all day trying to make it work. it seems that chmod doesn't like strings so after a long struggle I finnally solved my problem. Here's the solution: <? function chmody( $file, $mod ) { eval( '$done = @chmod( $file, ' . $mod . ' );' ); return $done; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.chmod.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54824 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54824&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54824&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54824&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54824&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54824&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54824&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54824&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92048) next »