Re: Problem in executing linux command from PHP

From: Date: Wed, 27 Aug 2003 14:25:01 +0000
Subject: Re: Problem in executing linux command from PHP
References: 1  Groups: php.db php.db 
Request: Send a blank email to php-db+get-30119@lists.php.net to get a copy of this message
From: "Gnanavel" <gnanavel_online@sify.com> > I have problem in executing linux command > > $output=exec("ls -a"); > echo "<pre>$output</pre>"; > > the above coding works, but > > $output=exec("cp file1 file2"); > echo "<pre>$output</pre>"; > > does not works. can any one help me out of this problem Riddle me this... exec() returns the last line of output from the result of the command. What is the last line of output when you run "cp file1 file2" from the command line? ---John Holmes...

« previous php.db (#30119) next »