I am using the codeigniter and I managed to create an upload system that checks for extension and size.
What I want to do now is to check if those files are tab separated and have a specific number of columns.
Anyone can point me in the right direction?
Thanks.
Read the first line and use preg_split
to split it based on the tab character.
The size of array returned should match the expected number of columns. If not, then the uploaded file is not valid.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.