Design

OOP doesn't eliminate the need for systems analysis. It's easy to forget about this step and to just start coding, especially when dealing with a fairly simple task. However, a little forethought during the design stage will reap benefits later on, so make sure you have a clear idea of what you want to do.

Defining the Problem

You often need to look at and manipulate the files in a specific directory, and you often want to do this with directories that hold resources such as photos or images, .pdf files, or files that are compressed for downloading. Probably the simplest approach, if your web server is Apache, is not to use any code at all and simply put a .htaccess file containing the directive Options +Indexes into the appropriate ...

Get Object-Oriented PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.