php - Upload failed via ftp.exe -


i using xampp on windows , want upload file via ftp.exe. created .vbs script creating ftp.dat file , 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 output log file giving me error:

ftp> connected xxx.xxx.xxx.xxx. open xxx.xxx.xxx.xxx 220 hostname ftp server ready. user (xxx.xxx.xxx.xxx:(none)):  331 password required 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. uploaded 0 bytes , downloaded 0 bytes. 

when run .vbs file in command line, works fine. if run using exec/system error above.

php file:

<? php     exec('c:\\xampp\htdocs\\upload.vbs'); ?> 


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -