Re: Executing a shell script HELP!

From: Date: Sun, 30 Sep 2001 23:38:53 +0000
Subject: Re: Executing a shell script HELP!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12853@lists.php.net to get a copy of this message
At 01.10.2001 00:02, you wrote:
I have a shell script that I am executing like this $files = shellscript; but if I do an if ($files) it doesn't read $files as existing. The contents of the shell script is a smbclient line that copies a bunch of DBF files from another machine. Anyone have any idea? Below is a little snipit of my code $files = updatemp; if ($files) {
    print "$files<br>";
    print "I am god";
} else {
    print "$files";
    print "It's ok you'll get it working. =)";
}
using `s doesn't work quite like they do in BASH (and many other scriptlanguages) use passthru() or something instead... I can't really see why you're doing this in PHP as BASH would be much more efficient... and to some extent easier, not to mention that this isn't far off a one-liner... -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then.

« previous php.db (#12853) next »