VB6 如何使用ftp上传文件到服务器
我以前的服务器,根目录是 /,直接使用 FtpCreateDirectory MyDir 则可以创建Ftp目录,使用FtpPutFile hCon, LocalFile,MyDir,0 则可以上传文件到MyDir目录下。
但是,我现在的服务器,根目录是 /public_html,直接使用 FtpCreateDirectory MyDir 则不能创建Ftp目录了,要采用 FtpCreateDirectory public_html/MyDir才能创建目录,使用FtpPutFile hCon, LocalFile,MyDir,0 ,或者 FtpPutFile hCon, LocalFile,public_html/MyDir,0 都不能上传文件到MyDir目录下。
为何之前的服务器能成功上传和创建目录,而现在的服务器采用相同的代码,就不能创建目录和上传文件了呢?要如何才能针对这种ftp服务器成功上传文件呢?