Problems with php opening files

I read the contents of a file through fread and determine how many lines there are in the file by reading the number of file newline characters (PHP_EOL), but the result is always one line less than the normal result. I want to ask if there is no newline after the last line but the file Terminator. Thank you

Php
Feb.19,2022

should be the last line without a newline character

Editing under Linux VIM automatically adds a newline character to the last line

I edited three rows of data in VIM (the last line did not enter), and what I saw was

clipboard.png

windows

clipboard.png

found that there is no corresponding newline character on the last line, which should be because of this

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e484d1-44c7f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e484d1-44c7f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?