ftp_nlist限制输出到数组中的9999个元素

I am having an issue with ftp_nlist(). It appears that when I try to use this function it is limiting the total amount of elements returned in the array to 9999. Why is this, and how can I get around this? I have a ftp directory that I am trying to pull all the files off of, that directory has over 20,000+ files.

Could it have something to do with php.ini?

Thanks for your help!

The issue that you're experiencing is related to the FTP recursion limit, which sounds like it is set to 9999. It can be raised by editing your FTP config file. If you are using Pure-FTP on your server, there's an article that can help you with that.