I tried to run a batch file via PHP functions exec()/passthru()/system()
Basically my batch file picks all the xml files from the current location and ftp them to a server.
None of the functions worked for me. Please help.
All files are located at the configured IIS folder Test IIS
batch file 'ftp.bat' contents are:
Code: Select all
cd c:\windows\system32
ftp -s:c:\TestIIS\ftp.txt 128.91.16.203Code: Select all
ora10g
ora10g
cd /home/oracle/dit/XMLDIR
prompt off
lcd c:\TestIIS
bin
mput *.xml
byeCode: Select all
<?php
if(isset($_POST['submit']))
{
echo exec('ftp.bat');
echo "Done!";
} else {
// display the form
?>
<form action="" method="post">
<input type="submit" name="submit" value="DO IT!">
</form>
<?php
}
?>
Please help