About the abnormal line break error that occurs when using file() to read the entire file! I am currently using PHP 4.03pl1 on my machine. When operating text data files, I use file() to read the entire file and then display it. The code is as follows: $message = file("message.txt"); $i=0; for($i=0;$i It is completely normal on my machine, but when I uploaded it to the server, I found that , originally one row of data was displayed as 2 rows, and there were originally 10 rows of data, but the result was displayed as 15 rows! It turns out that in some versions of php (less than php4.0.0), the string of this method cannot exceed 8190 characters. I also found the same explanation in the feedback about file() on php.net , the original English text is as follows: In PHP 4.0.0 and lower, array elements are never longer than 8190 characters. Longer lines are split. This limitation was removed in PHP 4.0.1
http://www.bkjia.com/PHPjc/531785.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531785.htmlTechArticleAbout the abnormal line break error that occurs when using file() to read the entire file! I currently use php 4.03pl1 natively and use file() to read the entire file when operating on text data files, and then...