Closed hulang closed 2 months ago
ftp_fput(): php_connect_nonb() failed: No error (0)
But using native PHP can
<?php date_default_timezone_set('Asia/Shanghai'); // 联接FTP服务器 $conn = ftp_connect('147.124.251.188'); // 使用username和password登录 ftp_login($conn, 'img_zjjcl_cn', 'zzzzzzzz'); ftp_set_option($conn, FTP_USEPASVADDRESS, false); ftp_pasv($conn, true); // 列示文件 $filelist = ftp_nlist($conn, '.'); $filelist['time'] = date('Y-m-d H:i:s'); print_r($filelist); ftp_put($conn, 'readme1111111.md', 'readme.md', FTP_ASCII); // 关闭联接 ftp_quit($conn);
run code
There is a readme1111111.md file in FTP
readme1111111.md
resolved https://github.com/thephpleague/flysystem/issues/1206 Fixed by adding 'passive'=> false, to config
https://github.com/thephpleague/flysystem/issues/1206
Fixed by adding 'passive'=> false, to config
Question
But using native PHP can
run code
There is a
readme1111111.md
file in FTP