Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- sending a variable to a shell script?
April 10, 2006, 3:04 pm
rate this thread
I thought it'd be best to use a shell script in order to automate the
FTP (logging in, changing to binary, putting the file, etc.) (If this
can all be done in PHP, that'd be great.)
But, how do I tell the shell script what the file name is supposed to
Here's what I have so far:
from the PHP script:
$filename = 'XXX111.ZIP'; // A dynamically created filename
ftp -n (servarname) <<EOC
user (username) (password)
If I can do all that in PHP, cool, but I think this will work fine if I
can send the script the filename.
Also, is there a problem with closing the PHP script after calling the
shell script, without affecting the FTP process?
Well, I guess I can find that out myself. =)