for example, the ip address of this machine is: 123.57.XX.XX.
if you enter the domain name of ftp, the upload fails, and the error in the following figure is reported.
what is the principle that you can succeed if you fill in localhost?
$ftp_server = "123.57.XX.XX"; //
//$ftp_server = "localhost"; //
$ftp_user_name = config("ftp.ftp_account");;
$ftp_user_pass = config("ftp.ftp_password");;
$conn_id = ftp_connect($ftp_server) or die("Could not connect");
...
...
...
ftp_login($conn_id,$ftp_user_name,$ftp_user_pass);
ftp_put($conn_id,$remote_file,$tmp_name,FTP_BINARY);