RE: [PHP] cannot execute?

From: Date: Thu, 25 Sep 2003 13:48:48 +0000
Subject: RE: [PHP] cannot execute?
Groups: php.general 
Request: Send a blank email to php-general+get-163902@lists.php.net to get a copy of this message
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:corwin@corwin.sk] 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 - -------------------------- :@: corwin@corwin.sk :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-----

« previous php.general (#163902) next »