Specifications
Editing Content
First, we need to think about how we will get content into the system, and how we will store
and edit that content.
Getting Content into the System
We need to decide on a way that stories and design components will be submitted. Three pos-
sible methods can be used.
FTP
The writers and designers could be given FTP access to areas on the Web server, and they
could then upload files from their local machine to the server. There would need to be a rigid
naming standard for the uploaded files (to identify which pictures belonged to which stories)
or a Web-based system to deal with this separately from the FTP upload.
Using FTP also creates issues with permissions in this situation. Because of the flexibility
required by this example, we will not be using FTP to allow users to upload files.
File Upload Method
As we discussed in Chapter 16, “Interacting with the File System and the Server,” the HTTP
protocol provides a method for files to be uploaded via the Web browser. PHP is able to deal
with this very easily.
The file upload method also gives us the opportunity to store text in a database rather than as a
file. To do this, we would read in the temporary file and store its contents in the database,
rather than copying it to another place in the file system. We will not use file upload for stories
in this project.
We will discuss the superiority of a database over the file system later.
Editing Online
We can let users create and edit documents without using either FTP or file upload. Instead
you can give the contributors a large text area input box onscreen in which their story content
can be edited.
This method is simple, but often effective. The Web browser does not provide any text editing
facilities beyond the cut-and-paste functionality of the operating system. However, when you
just need to make a small change—for instance, to correct a spelling mistake—it’s very fast to
bring up the content and amend it.
Similar to file upload, the form data could either be written to a file or stored in a database.
Building a Content Management System
C
HAPTER 26
26
CONTENT
MANAGEMENT
SYSTEMS
589
32 7842 ch26 3/6/01 3:36 PM Page 589










