Answer the question
In order to leave comments, you need to log in
Why doesn't the exec() function in php always return the correct result when getting the number of lines in a file?
there is a code that has been working for many years without problems and complaints:
$countRows = intval(exec("/usr/bin/wc -l fileName.csv"));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question