I don't know, but this works for me: <?php $correct = "ls -la"; $wrong = "123ls -la"; if(exec($correct)) print "correct cmd: correct\n"; else print "correct cmd: wrong"; if(exec($wrong)) print "wrong cmd: correct\n"; else print "wrong cmd: wrong"; ?>
Anyhow, you can parse the output, example: exec("ls -la", $outputLines); foreach($outputLines as $line) { print $line."<br>"; } -----Mensaje original----- De: Martin Hudec [mailto:[EMAIL PROTECTED] Enviado el: jueves, 25 de septiembre de 2003 15:42 Para: Javier Tacon; PHP-General Asunto: Re: [PHP] cannot execute? Importancia: Baja -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anyway I can't understand why php does not return any message in this: $mess = "blablabla"; if (exec("mogrify blbalba")) { $hlaska .= "xixixixix"; } echo $hlaska; - -- kind regards - -- Martin Hudec - -------------------------- :@: [EMAIL PROTECTED] :w: http://www.corwin.sk :m: +421.907.303.393 - -------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/cvDF1VPr1EE7sj4RAvHYAJ9n0c0OsivY7JPXyQlwnawKsIbMsgCePOU6 7h52E1LqpAoZy4fxerOR1W0= =rZ68 -----END PGP SIGNATURE----- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php