note 94656 added to function.ftp-chmod

From: Date: Tue, 17 Nov 2009 07:17:25 +0000
Subject: note 94656 added to function.ftp-chmod
Groups: php.notes 
Request: Send a blank email to php-notes+get-162970@lists.php.net to get a copy of this message
Just wanted to contribute a quick note for those who are still experiencing issues with changing the permissions via FTP. If you are having trouble with PHP recognizing the mode as an integer, you can take the previous poster's method: $mode = octdec ( str_pad ( $mode, 4, '0', STR_PAD_LEFT ) ); And add the following snippet right after: $mode = (int) $mode; This will force PHP to recognize the mode as an integer when you do: ftp_chmod ( $conn_id, $mode, $path ); These together never seem to fail for me. ---- Server IP: 69.147.83.197 Probable Submitter: 66.183.29.42 ---- Manual Page -- http://www.php.net/manual/en/function.ftp-chmod.php Edit -- https://master.php.net/note/edit/94656 Del: integrated -- https://master.php.net/note/delete/94656/integrated Del: useless -- https://master.php.net/note/delete/94656/useless Del: bad code -- https://master.php.net/note/delete/94656/bad+code Del: spam -- https://master.php.net/note/delete/94656/spam Del: non-english -- https://master.php.net/note/delete/94656/non-english Del: in docs -- https://master.php.net/note/delete/94656/in+docs Del: other reasons-- https://master.php.net/note/delete/94656 Reject -- https://master.php.net/note/reject/94656 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162970) next »