note 57630 added to function.ftp-chmod

From: Date: Sun, 09 Oct 2005 10:44:05 +0000
Subject: note 57630 added to function.ftp-chmod
Groups: php.notes 
Request: Send a blank email to php-notes+get-96748@lists.php.net to get a copy of this message
//php4 equivalent of the php5 function if (!function_exists('ftp_chmod')) { function ftp_chmod($ftpstream,$chmod,$file) { $old=error_reporting();//save old error_reporting(0);//set to none $result=ftp_site($ftpstream, "CHMOD ".$chmod." ".$file); error_reporting($old);//reset to old return $result;//will result TRUE or FALSE } } //demonstration of the function $ftp_ip="yourserverip"; $ftp_login="theuser"; $ftp_pass="thepassword"; $ftp_file="test.txt"; $conn_id=ftp_connect($ftp_ip); $login_result=@ftp_login($conn_id, $ftp_login, $ftp_pass); if(ftp_chmod($conn_id,"0775",$ftp_file)==FALSE)print"ERROR FTP_CHMOD: can't change chmod of $ftp_file"; ftp_quit($conn_id); ---- Manual Page -- http://www.php.net/manual/en/function.ftp-chmod.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57630 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57630&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57630&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96748) next »