1、打开控制面板,点击启动或关闭windows功能
2、在弹出的对话框中找到internet information servies展开。
3、把FTP服务器前面的勾取消,然后点击确定。
4、等待几分钟后,FTP服务即被关闭,这时候远程传输也会被禁止。
1、快捷键win+R,打开“运行”。/iknow-pic.cdn.bcebos.com/a50f4bfbfbedab6479fc143ef936afc378311e45"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/a50f4bfbfbedab6479fc143ef936afc378311e45?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/a50f4bfbfbedab6479fc143ef936afc378311e45"/>
2、输入框输入“explorerftp://用户名@IP地址”,点击确定。
/iknow-pic.cdn.bcebos.com/562c11dfa9ec8a13d3910e1ef903918fa1ecc041"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/562c11dfa9ec8a13d3910e1ef903918fa1ecc041?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/562c11dfa9ec8a13d3910e1ef903918fa1ecc041"/>
3、然后进入登陆界面。
/iknow-pic.cdn.bcebos.com/08f790529822720ec94abb0475cb0a46f31fab4c"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/08f790529822720ec94abb0475cb0a46f31fab4c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/08f790529822720ec94abb0475cb0a46f31fab4c"/>
4、登录用户名和密码,点击“登录”。
/iknow-pic.cdn.bcebos.com/d1160924ab18972bb77f5a34e8cd7b899f510a82"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/d1160924ab18972bb77f5a34e8cd7b899f510a82?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/d1160924ab18972bb77f5a34e8cd7b899f510a82"/>
5、进去ftp服务器界面。
/iknow-pic.cdn.bcebos.com/09fa513d269759ee85c93835bcfb43166c22dfb7"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/09fa513d269759ee85c93835bcfb43166c22dfb7?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/09fa513d269759ee85c93835bcfb43166c22dfb7"/>
6、找到根目录web文件夹,打开。
/iknow-pic.cdn.bcebos.com/4e4a20a4462309f72ecbe8ec7c0e0cf3d6cad6ac"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/4e4a20a4462309f72ecbe8ec7c0e0cf3d6cad6ac?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/4e4a20a4462309f72ecbe8ec7c0e0cf3d6cad6ac"/>
7、web下存放的文件及其内容。
/iknow-pic.cdn.bcebos.com/359b033b5bb5c9eacdfc471ddb39b6003bf3b3c5"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/359b033b5bb5c9eacdfc471ddb39b6003bf3b3c5?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/359b033b5bb5c9eacdfc471ddb39b6003bf3b3c5"/>
为了与FTP Internet服务器通讯,必须先创建一个CInternetSession实例,然后创建CFtpConnection对象。创建CFtpConnection对象不采用直接方式,而是调用CInternetSession::GetFtpConnertion来创建并返回一个指向它的指针。CFtpConnection类的成员
构造函数 CFtpConnection 构造一个CFtpConnection对象
操作 SetCurrentDirectory 设置当前FTP目录
GetCurrentDirectory 获取此次连接的当前目录
GetCurrentDirectoryAsURL 获取作为URL的此次连接的当前目录
RemoveDirectory 从服务器移去指定目录
CreateDirectory 在服务器上构造一个目录
Rename 将服务器上的文件改名
Remove 从服务器上移去一个文件
PutFile 将一个文件放到服务器上
GetFile 从连接的服务器上获取一个文件
OpenFile 在连接的服务器上打开一个文件
Close 关闭与服务器的连接
实例一:上传文件
CString strAppName = AfxGetAppName()
CInternetSession* pSession = new CInternetSession(strAppName)
CFtpConnection* pConn = pSession->GetFtpConnection("
10.46.1.232","Anonymous","",21)
pConn->SetCurrentDirectory("test")
CString strLocfile,strRemotefile
strLocfile="C:\\cmd.txt"
strRemotefile="cmd.txt"
pConn->PutFile(strLocfile,strRemotefile,FTP_TRANSFER_TYPE_ASCII)
pConn->Close()
return 0
实例二:Ftp的打开文件操作函数:OpenFile
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)