It was crazy. I was trying to make my ZipArchive work and I know now, that it was already working just Symfony2 did not knew about it!
All you need to do is just add this line into your controller or any other place where you are trying to use ZipArchive:
Just add use ZipArchive; on the top of your file in Symfony 2 and you will be able to use PHP ZipArchive class.
Fatal error: Class 'Demo\AcmeBundle\Controller\ZipArchive' not found
All you need to do is just add this line into your controller or any other place where you are trying to use ZipArchive:
use ZipArchive;That's it!
Just add use ZipArchive; on the top of your file in Symfony 2 and you will be able to use PHP ZipArchive class.
Thanks for this! The only useful info I found.
ReplyDeleteyou welcome ;)
Delete