What's the maximum number of keys for an array in php

后端 未结 10 1593
一整个雨季
一整个雨季 2021-02-08 03:32

I\'m writing a php script where I call

$lines = file(\'base_list.txt\');

to break a file up into an array. The file has over 100,000 lines in

10条回答
  •  后悔当初
    2021-02-08 04:04

    Two suggestions:

    1. Count the actual number of items in the array and see whether or not the array is the correct number of entries (therefore eliminating or identifying print_r() as the culprit)

    2. Verify the input... any chance that the line endings in the file are causing a problem? For example, is there a mix of different types of line endings? See the manual page for file() and the note about the auto_detect_line_endings setting as well, though it's unlikely this is related to mac line endings.

提交回复
热议问题