Execute an external program

From: Date: Wed, 24 Apr 2002 16:24:00 +0000
Subject: Execute an external program
Groups: php.general 
Request: Send a blank email to php-general+get-94415@lists.php.net to get a copy of this message
Hello: I use a W2000+Apache+PHP 4.1.2, and I want to execute an external command from PHP script, the line is something like this: psftp.exe root@172.168.0.108 -pw root -b bat.txt psftp is a secure ftp console program, and the bat.txt file contains all the necessary commands to get a file from the server and quit the session. If I execute this line from a console, everything goes well, connects to the server, gets the file and return to the console, but I'm trying to do the same from a PHP script in various ways, popen, , exec... Always is the same, it seems it does nothing, and I'm sure the psftp.exe and bat.txt files are in the same dir of the script. Also I have created a console program with Delphi to execute the command, but doesn't work. Any idea? Best Regards. ---------------------------------------------------- QaDRAM Studio, RAD Development for the WEB http://studio.qadram.com

« previous php.general (#94415) next »