我有一些关于ftp_connect()的问题;我不能通过ftp.localhost或ftp.edgren.myftp.org连接到我自己的FTP服务器。当我尝试连接时收到以下错误消息:
Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in ...
我使用的代码是:$conn_id = ftp_connect('ftp.localhost') or die("Couldn't con
我试图登录到一个FTP服务器,我只是在我的网络本地运行。要做到这一点,我必须使用我的ip地址作为服务器地址(见下面的代码)。然而,每次我得到一个gaierror: Errno 11004 getaddrinfo失败的错误。
有人能看看我的代码,看看我是否犯了什么错误,这可能是造成这个地址问题的原因吗?此外,我也可以从我的浏览器登录到ftp服务器,这样我就知道服务器已经启动并正确运行,并且允许匿名登录到服务器。
#import the ftp lib.
from ftplib import FTP
#enter the address of the ftp server to use, use
我正在尝试从Debian 8下的命令行连接到Filezilla服务器(ms windows主机)。
我搜索了大量文档,并看到了大量教程,它们说,在一行中连接到服务器的一个好方法是:
ftp -in ftp://myusername:mypasswd@ip.v4.addr.here
当我运行此命令时,ftp不进行连接,并得到以下错误:
ftp: ftp://myusername:mypasswd@ip.v4.addr.here: Name or service not known
有人知道这是怎么回事吗?我需要指定什么端口吗?(服务器正在监听端口21)
我的目标是编写一个简短的bash脚本来上传
我正在尝试从FTP服务器(使用FileZilla服务器)下载到我的本地计算机,但是我一直在出错。
这是我的密码
<?php
// connect and login to FTP server
$ftp_server = "127.0.0.1";
$ftp_username = "myusername";
$ftp_userpass = "mypassword";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
我正在编写一个脚本,它会自动连接到ftp服务器,并上传两个简单的文件。我在互联网上找到了许多指南,用来通过批处理文件上传文件到ftp服务器,而且它工作得很好。
我的问题是,我需要用PKCS证书连接到服务器。甚至可以用批处理编写这样的脚本吗?
如果没有,还有其他的可能性吗?
系统: Windows 7.7601
当前脚本:
set tempftp=fileserver.ftp
:# create ftp-script
echo OPEN xxx.xx.xx.xx > %tempftp%
echo USER username pwd >> %tempftp%
rem not w
我正在尝试下载文件到服务器后,服务提供更新他们的服务器。登录信息是准确的。我使用了一个通用代码来完成这个任务。示例:
<?php $file = $ROOT.$_GET['file'];
$ftp_server = "127.0.0.1";
$ftp_user_name = "user";
$ftp_user_pass = "pass";
// set up a connection or die
$conn_id = ftp_connect($ftp