Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

MacroMan/PHPTerminalHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

No longer maintained and not planning to update

TerminalHelper

A helper utility for terminal written in PHP that gives very easy access to native escape sequences to allow changing of color and also control of the cursor and display modes

This should run fine on most *nix and OSx environments and also on Windows as long as ANSI.SYS is installed. See https://en.wikipedia.org/wiki/ANSI.SYS

@author MacroMan (David Wakelin) - davidwakelin.co.uk

@licence GNU GENERAL PUBLIC LICENSE v2 - See LICENSE

@usage - Include the class in your script. Create a new instance and call the methods to send the commands to the terminal window.

@example

include('TerminalHelper.php');
$helper = new TerminalHelper();

// echo some text
echo "This is some text\n";

// Change to text and bg color before the next echo
$helper->textColorSet(TerminalHelper::COLOR_GREEN);
$helper->textBackgroundColorSet(TerminalHelper::COLOR_WHITE);

// This text will be green on a white background
echo "This is some colored text";

// Remember to reset the text before exiting, other wise the terminal will still be colored
$helper->textReset();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages