Color in Windows CLI?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Does anyone know how to make PHP display colors in the CLI (Command
Line Interface)?  I've tried almost everything including ANSI.SYS under
command.exe.  I would like to find a way to do it under cmd.exe, I know
it will do colors under Linux in CLI using codes like "←[0;34mtest
←←[0m←" for Blue, but I need something to work unde
r Windows.



Re: Color in Windows CLI? wrote:
Quoted text here. Click to load it
der Windows.

If you can somehow get the Win32 module to work, the functions your
need are GetStdHandle() and SetConsoleTextAttribute(). Both are in
kernel32.dll I believe.

Site Timeline