I’m using this code now to display a text file on a php/html page.
<?php
foreach (glob("example.txt") as $filename) {
echo nl2br(file_get_contents($filename));
echo "<br></br>";
}
?>
I’m looking for a way to display the example.txt file from another server with URI.
Something like this: http://address.com/dir/example.txt
Is there a simple way to do this?
(I would use an iframe but it’s not possible to style the text without Java or JQuery).
You code is totally wrong
They can only one
example.txtfile in a folder at a time except you want to get all text files should should be like this in the first placeIf that is not the case the code would work for both remote and local file