PDA

View Full Version : [ubuntu] output of tail via php is losing colours and displaying [31:



SlugSlug
November 20th, 2012, 01:55 PM
Hi am trying to display the output of a log via apache



<?php echo shell_exec('tail -10 /path/log/file.log'); ?>now in bash this displays colours but via web I get the text vi shows which is kind of like colour codes..
eg


[36;1

pkadeel
November 20th, 2012, 02:15 PM
because a web page needs html tags or css to do the coloring

SlugSlug
November 20th, 2012, 02:17 PM
It looks like I need some form of ansi output for php.

Does anyone know of this?