note 14894 deleted from function.chmod by irc-html
| From: | irc-html@php.net | Date: | Thu, 03 Jan 2002 02:11:02 +0000 |
| Subject: | note 14894 deleted from function.chmod by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24327@lists.php.net to get a copy of this message | ||
It looks like chmod does not work with ftp connections when PHP's Safe Mode is enabled. Here
you have another way to use chmod without using ftp_connect();
( Español: Parece que chmod no funciona en conexiones ftp cuando PHP's Safe Mode está
habilitado, aquí teneis otra manera de usar chmod sin usar ftp_connect(); )
<?
$noftp = fsockopen("ftp.example.com", 21, $errno, $errstr, 60) or die("Fallo de
Conexión");
socket_set_blocking($noftp, false);
fputs($noftp, "USER user\n");
fputs($noftp, "PASS password\n");
sleep(1);
fputs($noftp, "SITE chmod 0777 /www/example.../file.xxx\n");
sleep(1);
fclose($noftp);
?>