Cómo usar Utilidades en páginas estáticas

Quiero usar File y Folder Utilities to list files in a folder (which is located in webroot directorio)

It's so easy to do it in a controller action, but how can I use them a static page? (which there's no action in PagesController para ello)

preguntado el 30 de julio de 12 a las 02:07

1 Respuestas

You can do that just like in a controller. Load the Classes with App::uses() and create an instance. It works everywhere inside of CakePHP (model, controller, helper, component, view, ...).

Ver http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html para más detalles.

Respondido 30 Jul 12, 07:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.