|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-07-17 20:21 UTC] menz12x at gmail dot com
Description:
------------
<?php
if (is_file($Fichier)) {
if ($TabFich = file($Fichier))
{
$numTotal=count($TabFich);
echo count($TabFich);
}
?>
Test script:
---------------
file() function return FALSE for a file over than 10000 lines
Expected result:
----------------
i'd like to see the number of lines the file() function returns
Actual result:
--------------
the file () function returns nothing
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 21:00:01 2025 UTC |
You will need to provide some more info here. Works perfectly on Linux on files 10x that. eg. 11:58am new:~> wc test.txt 100003 300003 26033650 test.txt 11:58am new:~> php -a Interactive shell php > error_reporting(-1); php > $a = file('./test.txt'); php > echo count($a); 100003 php > echo $a[9999]; [9997] => 99989998999899989998999899989998999899989998999899989998999899989998999899989998 99989998999899989998999899989998999899989998999899989998999899989998999899989998 9998999899989998999899989998999899989998