Loop through a folder of files in symfony

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Locked
sobha
Forum Commoner
Posts: 56
Joined: Wed Jul 15, 2009 9:08 pm

Loop through a folder of files in symfony

Post by sobha »

Hi,

I am new to phpsymfony and need help in :

1.Loop through a folder of files.
- Each filename is built up as: customerid_invoiceid.pdf
- Extract these id's
For example:files are stored in "c:/PDF/ customerid1_invoiceid1.pdf and so on
Can you please help me on how to do this using symfony?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Loop through a folder of files in symfony

Post by Celauran »

Locked