国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

php ftp_connect()返回bool(true)
ringa_lee
ringa_lee 2017-04-10 16:58:14
0
2
759

代碼如下
<?php

$ftpServer = "192.168.1.118";
$ftpUser = "hqzn-ftp";
$ftpPwd = "123456";

$conn = ftp_connect($ftpServer) || die(printf("Couldn't connect to $s", $ftpServer));
var_dump($conn);
$login_result = ftp_login($conn, $ftpUser, $ftpPwd);

結(jié)果如下

bool(true) 
Warning: ftp_login() expects parameter 1 to be resource, boolean given in C:\Users\hqzn\phpStudy\WWW\EasyDarwin\html\ftp.php on line 8

為什么ftp_connetc返回了一個(gè)bool(true)?
導(dǎo)致ftp_login無法連接上ftp
使用ftp工具是可以正常連接的

ringa_lee
ringa_lee

ringa_lee

reply all(2)
洪濤

ftp_connect($ftpServer) || die(printf("Couldn't connect to $s", $ftpServer)); 中的 || 換成 or 就好了

Ty80

確實(shí)是這個(gè)問題
感謝解答

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template