- How do I print 2>&1 in color???
- Posted by Phil Powell on January 26th, 2004
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?
Thanx
Phil
- Posted by David Efflandt on January 26th, 2004
On 26 Jan 2004 08:26:17 -0800, Phil Powell <soazine@erols.com> wrote:
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/
- Posted by Phil Powell on January 26th, 2004
efflandt@xnet.com (David Efflandt) wrote in message news:<slrnc1aqpd.qlm.efflandt@typhoon.xnet.com>...
I just plugged it in as is incorporating it into a PHP variable..
works like a charm, thanx so much!
Phil