On 26 Jan 2004 08:26:17 -0800, Phil Powell <so*****@erols.com> wrote:
exec("chmod 0644 $fyl 2>&1");
This PHP command, as you know, will evoke an EXEC to do CHMOD on the
command line. Everything works fine, including printing the
appropriate error message piped out to STDOUT.
However, I would like the error messages in color. How do I do that
with 2>&1 within PHP or whatever?
PHP sounds like a browser issue, so you would use normal html methods to
set/clear font color before/after. If it was a shell script in a
terminal, you could use ansi screen codes like:
echo -ne "\033[01;31m"; chmod 0644 bogus.file 2>&1; echo -ne "\033[0m"
But not sure how to plug that into exec().
--
David Efflandt - All spam ignored
http://www.de-srv.com/