php测试ftp连接脚本如下:
<?php $host = "xxx.xxx.xxx.xxx"; $user = "username"; $pwd = "password"; $port = "21"; $conn = @ftp_connect($host, $port) ; if($conn == false) { echo "conn fail!"; } else { echo "conn success!"; } $login = @ftp_login($conn, $user, $pwd); if(empty($login)) { echo "login fail!"; } else { echo "login success!"; } ?>
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/xiaokfc/article/details/46966533