Display Text File Content In The Page Using PHP
Submitted by argie on Wednesday, March 5, 2014 - 13:12.
This is a continuation of previous tutorial on Save Data To Text File Using PHP. This tutorial will teach you on how to display text file content in our page using PHP. The feature of this program is it allows you to echo or output all the save in our text file. Follow the details bellow on how to this code.
That's it you've been successfully created a script that allows you to display text file content using php.
Creating Our Script that Display text file Content
The code bellow includes the link source of our text file. I used nl2br and file_get_contents to display the text file contents. nl2br is a function that inserts HTML line breaks before all newlines in a string. Copy the code bellow and save it as "index.php".- <?php
- $filename='informationlist.txt';
- echo "<br></br>";
- ?>
Comments
Add new comment
- Add new comment
- 625 views