Reputation: 185
I have this code to show txt file :
<textarea rows="11" cols="190">
<?php
$file = file_get_contents('./test.txt', FILE_USE_INCLUDE_PATH);
echo $file;
?>
</textarea>
in one clean html file, it looked like this:
but when i paste it in laravel with portoadmin template, the txt format is broken and it looked like this:
What is wrong with that?
Thanks in advance
Upvotes: 1
Views: 880
Reputation: 6438
Change your web-font into monospace-type font, like this. For example, if you render your txt
file inside:
<div id="container">
</div>
Then make sure that #container
element is using monospace-type font. For instance:
#container {
font-family: "Roboto Mono", monospace;
}
Upvotes: 2