shell - How can I syntax highlight the output from the exec() function in PHP? -


I am getting the output from and I have to highlight some syntax in the results.

raw output

current output is raw:

  * [35mmanu [m / etc / init.d / mast: line 105: / var / Log / mast / mast -all.log: Text  

deprecated with permission such as [35m color.

target

highlights syntax

The answer to this question is the answer.

Solution

written from Ansi to html c The adapter is available on an Ubuntu package and Github.

My code is just:

  exec ("$ command | aha", $ output, $ exitcode); Forex Currency ($ output = $ k = & gt; $ line) {if ($ line == '1') {continue; } "$ Line" echo; }  

Description

  Aha takes the input of SGR-color and prints the W3C compliant HTML code. Ah reads input from a file or stdin and writes HTML-code to stdout.  

is something:

  • - black , -b : black background and white "standard Color "
  • - Word-wrap , -w : wrap long lines in the HTML file. It works with the CSS3 collaborative browser as well as many older people.
  • , no-header , -n : Does not include header in generated HTML is useful for inclusion in full HTML files.

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -