To convert the plain text line breaks to html line breaks, try this:
$fh = fopen("filename.txt", 'r');
$pageText = fread($fh, 25000);
echo nl2br($pageText);
Note the nl2br function wrapping the text.
More Related Contents:
- when i refresh will delete all records
- Calling a function on click of button in HTML/PHP [closed]
- PHP mkdir with form input and security
- PHP Errors – Total of four [closed]
- syntax error unexpect something [closed]
- Run php code inside .html() jQuery function
- Call php function from JavaScript
- Ajax Upload image
- How can I echo HTML in PHP?
- How to read if a checkbox is checked in PHP?
- method=”post” enctype=”text/plain” are not compatible?
- HTML Element Array, name=”something[]” or name=”something”?
- POST an array from an HTML form without javascript [duplicate]
- Converting HTML to plain text in PHP for e-mail
- How to properly indent PHP/HTML mixed code? [closed]
- Best way to avoid the submit due to a refresh of the page
- HTML – Change\Update page contents without refreshing\reloading the page
- PHP POST not working
- “slash before every quote” problem [duplicate]
- How to embed images in html email
- Send PHP HTML mail with attachments
- Make mp3 seekable PHP
- GET vs. POST Best Practices
- How can I convert a docx document to html using php?
- PHP – Check if the page run on Mobile or Desktop browser [duplicate]
- New containing div after every 3 records
- Detecting file upload size on the client side?
- Create table with PHP and populate from MySQL
- How to get VALUE from FORM without Submitting it?
- jQuery Mobile: Sending data from one page to the another