dozpox8752 2015-07-21 21:04
浏览 64

通过ftp.exe上传失败

I am using xampp on Windows and want to upload an file via ftp.exe. I created a .vbs script creating an ftp.dat file and run ftp.exe.

Set FS = CreateObject("Scripting.FileSystemObject")
Set FileIn = fs.OpenTextFile("C:\xampp\htdocs\ftp.dat", 2, true)
filein.WriteLine "open"
filein.WriteLine "IP"
filein.WriteLine "USER"
filein.WriteLine "PASSWORD"
filein.WriteLine "put C:\path\to\file\file.txt"
filein.WriteLine "quit"
filein.close

Set WSHShell = WScript.CreateObject("WScript.Shell")
WshShell.run "cmd /c ftp.exe -s:C:\xampp\htdocs\ftp.dat > log"

I printed the output to a log file giving me this error:

ftp> To Connected to XXX.XXX.XXX.XXX.
open
XXX.XXX.XXX.XXX
220 hostname FTP server ready.
User (XXX.XXX.XXX.XXX:(none)): 
331 Password required for USER.

230 User USER logged in.
ftp> put C:\path\to\file\file.txt
200 PORT command successful.
553 file.txt: Permission denied.

ftp> quit
221 Goodbye. You uploaded 0 bytes and downloaded 0 bytes.

When I run this .vbs file in the command line, everything works fine. But if I run this using exec/system I get the error from above.

PHP File:

<? php
    exec('C:\\xampp\htdocs\\upload.vbs');
?>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制