문제

I'd my project in Symfony 1.4 (Please keep version in mind)

As a new requirement, in admin panel, admin need to upload bulk images. For that, admin will provide a zip file with images and a csv file with required info about images.

I earlier handled reading CSV task in core PHP using fgetcsv. However I'm interested to know if there is any plugin/build-in support in symfony 1.4 as better way (in terms of performance/speed) of reading CSV task or looping through fgetcsv in model/controller is only option.

도움이 되었습니까?

해결책

Well, I don't think there is a function or a class that could be much faster than using the PHP function.

I've perform a quick search, only 2 plugins exists:

But they both use fgetcsv to read each line. You still can use them to have a kind of clean & short way to read a CSV file.

They both have an interesting function that allow you to export as a CSV file a single table from your model (using Propel in sfCsvPlugin and Doctrine in tmCsvPlugin).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top