Hello Forum,
I’m terribly new to web development, and I’m attempting to use the Laminas/Text/Figlet library to render figlet in php on my website. I have a shared hosting plan which features php 8.x, apache, and shell access to composer, I was able to install the Laminas/Text/Figlet/Figlet() library via composer, and linked the autoload.php to my html thusly:
<?php
require __DIR__ . '/vendor/autoload.php';
use Laminas\Text\Figlet;
$figlet = new Laminas\Text\Figlet\Figlet();
echo $figlet->render('test');
?>
I was finally able to get it to work, but when it’s rendered on the webpage instead of looking like a chubby block of text like figlet normally does, it appears that the figlet is just parsed on one whole line with no carriage returns. Here is “test” rendered on the webpage:
Or this, the image above isn’t displaying properly, so I’ve pasted the figlet which has been rendered below, it’s working but it’s not arranging the ascii characters to build the figlet font properly:
______ _____ _____ ______ /_ _// | ___|| / ___// /_ _// `-| |,- | ||__ \___ \\ `-| |,- | || | ||__ / // | || |_|| |_____|| /____// |_|| `-`' `-----` `-----` `-`'
Are there any secrets to getting the text to render with extra parameters? I’ve tried scouring the web for extra information and trying to tinker with the different options hasn’t yielded any results.
Any help would be appreciated, thank you!