Reverse reading files

xiaoxiao2021-03-06  65

Reverse reading files

Author: large matrix workshop Joined: 2004-02-19 Views: 100 Some beginners may try to write some text data of the program, and to every record stored as a line (such as guestbook). When writing data, the newly added data may be added to the file. But when reading the file and output, it will be found to be on the old record, the new record is under. So, the new record is output in the following manner below? Very simple, first use the file () function to read all rows of the file as an array, and use the array_reverse () function to reverse the order of each unit of the array. Please see example:

转载请注明原文地址:https://www.9cbs.com/read-110996.html

New Post(0)