On 3/14/07, sucram <[EMAIL PROTECTED]> wrote:
> I'd like to show the content of a folder in a view template. I've seen
> there is a core class with the function ls()
In your controller

uses('folder');

$folder = new Folder('/path/which/you/want/to/ls');
$files_in_folder = $folder->ls();
$this-set('files_in_folder',$files_in_folder);

The last line will make the $files_in_folder available in your view -
do whatever you wish with it there...

Read more at http://api.cakephp.org/class_folder.html

HTH
Tarique

-- 
=============================================================
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=============================================================

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to