O'Reilly logo

Yii Project Blueprints by Charles R. Portwood II

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Uploading files

The final component that we'll be adding to our module is a file manager with file upload capabilities. For this component, we'll be creating a dedicated controller to view all of our uploaded files in paginated format, several new classes to handle the actual file upload, and a few view changes to our content save view so that we can associate files with a particular article.

Rather than bundling all of this functionality into our FileController that we'll be building, we'll start by building three different components to handle the various aspects of uploading a file. The first class File will represent a $_FILES['file'] object and will provide the functionality for saving the file. The second class, FileUpload, will be our call ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required