php-src/ext/ftp/tests/ftp_chmod_basic.phpt
2012-10-10 10:27:49 +08:00

22 lines
412 B
PHP

--TEST--
Testing ftp_chmod returns file mode
--CREDITS--
Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br>
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
require 'skipif.inc';
?>
--FILE--
<?php
require 'server.inc';
$ftp = ftp_connect('127.0.0.1', $port);
if (!$ftp) die("Couldn't connect to the server");
ftp_login($ftp, 'user', 'pass');
var_dump(ftp_chmod($ftp, 0644, 'test.txt'));
?>
--EXPECT--
int(420)