Split a text file into 2 equal portions
I have a large text file that i wish to process with PHP.
It makes the server generate a 500 error, but if I manually cut the file down to size the script works, is there an easy way for changing:
file.txt
to
file_1.txt and
file_2.txt
where file_1 and file_2 have equal line counts.
Thanks
|