51Testing软件测试论坛

标题: 求教ftp_get 和 ftp_get_ex的区别 [打印本页]

作者: twinsczl    时间: 2013-7-15 14:06
标题: 求教ftp_get 和 ftp_get_ex的区别
The ftp_get function sets the working directory on the FTP server.

This function is for use with global sessions. For multiple sessions, use the ftp_get_ex function, which allows you to specify a session identifier.


The ftp_get_ex function sets the working directory on the FTP server for the specified session.

This function is for use with multiple sessions. For global sessions, use the ftp_get function, which does not take a session identifier argument.

官方的文档没怎么看明白,求大神指点!
作者: goal1860    时间: 2013-7-17 07:00
ftp_get_ex是要指定特定的连接对话(session),而ftp_get是使用默认的连接,或者叫全局对话(global session)。还搞不懂就用ftp_get。哪天有需要管理多个连接了自然也就明白了。
作者: twinsczl    时间: 2013-7-17 12:33
ftp_get_ex是要指定特定的连接对话(session),而ftp_get是使用默认的连接,或者叫全局对话(global sessi ...
goal1860 发表于 2013-7-17 07:00


嗯,但是我无法区分什么时候我该用ftp_get  什么时候该使用ftp_get_ex

这两种方式去请求FTP服务器有什么不同呢?
作者: goal1860    时间: 2013-7-18 07:41
回复 3# twinsczl


   看你有多少会话要管理。假如你还是不清楚的话说明你应该用ftp_get




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2