Results 1 to 3 of 3

Thread: output of tail via php is losing colours and displaying [31:

  1. #1
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,514
    Distro
    Ubuntu

    output of tail via php is losing colours and displaying [31:

    Hi am trying to display the output of a log via apache


    Code:
    <?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
    
    Code:
    [36;1

  2. #2
    Join Date
    Oct 2012
    Beans
    182

    Re: output of tail via php is losing colours and displaying [31:

    because a web page needs html tags or css to do the coloring

  3. #3
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,514
    Distro
    Ubuntu

    Re: output of tail via php is losing colours and displaying [31:

    It looks like I need some form of ansi output for php.

    Does anyone know of this?
    Last edited by SlugSlug; November 20th, 2012 at 04:43 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •