Chapter 20: A database-driven website
Murach's PHP and MySQL (4th Ed.)
MULTIPLE CHOICE
1.
When you develop a content management system, you can use PHP’s ____________ functions to
parse the user entries so they can be formatted for display in the browser.
a.
array handling
c.
formatting
b.
string handling
d.
all of these
ANS: B
2.
The include ________________ for a PHP application tells PHP where to look for the files specified
by the include(), include_once(), require(), and require_once() functions.
a.
file
c.
path
b.
view
d.
root
ANS: C
3.
In a website that uses the MVC pattern, it’s common to store the files for each application within the
site in a separate ________________.
a.
directory
c.
root directory
b.
content management system
d.
none of these
ANS: A
4.
General-purpose files are often called ________________ files because they can be used by many
applications.
a.
convenience
c.
resource
b.
service
d.
utility
ANS: D
5.
When you use PHP to format the data that’s entered into a content management system, you
a.
remove all HTML tags from the data
b.
add HTML tags to the data wherever necessary
c.
never convert special characters to HTML character entitites
d.
always convert special characters to HTML character entitites
ANS: B
6.
Include files may include all but one of the types of files that follow. Which one is it?
a.
utility
c.
model
b.
view
d.
controller
ANS: D
7.
To set the include path for a website, you can use the
a.
include_path() function
b.
include_path() method
c.
set_include_path() function