PHP EXAM 2 REVIEW *TERMS ONLY*

Ace your homework & exams now with Quizwiz!

There are security risks using the $_REQUEST autoglobal because it includes the contents of the ____ autoglobal as well as the $_GET and $_POST autoglobals.

$_COOKIES

When a form is posted, information from the uploaded file is stored in the ____ autoglobal array.

$_FILES['...']

The script in the dynamic data section of the Web page template will check the value of the ____ array to determine which page to display, assuming the name being passed is 'page'.

$_GET['page']

The ____ autoglobal can be used to access the result from form data sent with both the get and post methods.

$_REQUEST

The symbol ____ appends one array to another.

+

If there are no indexes or keys entered in the value of the name attribute in a form, PHP assigns an index of ____ to the first element.

0

If there are no indexes or keys entered in the value of the name attribute in a form, PHP assigns an index of ____ to the first element. 0

0

The operational constant of the flock() function that opens the file with an exclusive lock for writing is the ____.

LOCK_EX

Autoglobals are associative arrays whose elements are referred to with a(n) ____ key instead of an index number.

alphanumeric

A multidimensional array in PHP is essentially ____.

an array of arrays

The ____ function returns an array of elements that exist in one array but not in any other arrays to which it is compared.

array_diff

The ____ function determines whether a given index or key exists.

array_key_exists()

Merge two or more arrays with the ____ function.

array_merge()

The ____ argument of the array_splice() function indicates the name of the array you want to modify.

array_name

The ____ function determines whether a given value exists in an array.

array_search( )

The ____ function determines whether a given value exists in an array and returns the index or key of the first matching element if it exists and FALSE if it does not.

array_search()

You use the ____ function to return a portion of an array and assign it to another array.

array_slice ( )

The ____ function lets you add or remove elements anywhere else in the array.

array_splice()

The ____ function removes duplicate elements from an array.

array_unique()

To renumber an indexed array's elements, you need to run the ____ function.

array_values( )

Autoglobals or superglobals are predefined ____.

arrays

What function returns a line, strips any XHTML tags the line contains, and then moves the file pointer to the next line?

fgets($handle[, length])

The ____ function reads the contents of a text file that stores each individual line as an element of an indexed array.

file ( )

Instead of reading a large text file into PHP, you can use the ____ to iterate through a text file.

file pointer

The ____ function should be used before deleting files and directories to determine if the file or directory name exists.

file_exists

When a text file contains a single block of text, the ____ function would read the entire contents of the file into a string.

file_get_contents()

The ____ function writes a text string and creates the file if it does not exist.

file_put_contents()

The array_shift() function removes the ____ element from the beginning of an array.

first

Which of the following is NOT a required argument of the mail() function?

from

Because the fopen() function must be used with the ____ function, you can specify what type of operations can be performed on the file and where and how the data will be written.

fwrite()

When you use the ____ method to submit form data to the processing script, the form data is appended to the URL specified by the action attribute.

get

The second digit in the file permission code assigns permissions to the ____.

group

The array_pop() function ____ from the end of the array.

removes the last element

The ____ function only works when there are "." and ".." are the only two entries present in a directory.

rmdir()

The ____ function can be used to ensure that a number has the appropriate number of decimal places.

round ( )

The ____ function returns an indexed array containing the names of files and directories in the specified directory.

scandir()

What function is used to copy the names of the files in a directory to an array?

scandir()

If the content of a Web page template section does not change unless the include file is modified, it is called a ____ section.

static

A form that contains the values that a user previously entered in the form is called a ____ form.

sticky

What function returns a line that ends with a specified delimiter and moves the file pointer to the next line?

stream_get_line($handle, length, delimiter)

The ____ function is used to reverse the changes made by magic quotes or the addslashes() function.

stripslashes()

A Web page ____ is a single Web page that is divided into sections

template

Multidimensional arrays are not limited to ____.

two dimensions

The most common type of multidimensional array is a(n) ____ array.

two dimesional

A ____ form contains one page that displays the Web form and one page that process the form data.

two-part

What function is used to delete files?

unlink()

When using form image buttons, each button requires a unique ____ for the name attribute..

value

You can use ____ autoglobal array to refer to the global version of a variable from inside a function

$GLOBALS

You can use ____ autoglobal array to refer to the global version of a variable from inside a function.

$GLOBALS

The two simplest forms of the ____ are the plain e-mail address and the recipient's name followed by the e-mail address in angle brackets.

Address Specifier

The ____ constant instructs PHP to append data to any existing contents in a specified filename instead of overwriting it.

FILE_APPEND

The additional_headers argument needs to be formatted to conform to the syntax of headers in the ____ documentation.

Internet Message Format

On a Macintosh platform, you append the ____ carriage return escape sequence to the end of the line.

\r

Using a value of ____ for the mode argument of the fopen() function opens the specified file for reading and writing and places the file pointer at the end of the file.

a+

The value of the ____ attribute identifies the program on the Web server that will process the form data when the form is submitted.

action

The array_push() function ____ one or more elements to the end of the array.

adds

Two arguments, source and destination, are used with the ____ function.

copy()

To remove multiple elements using the unset() function, separate each ____ name with commas.

element

The ____ function can be used to determine if a variable contains values.

empty ( )

The $_ENV autoglobal contains ____ variables that programs use to interact with the system.

environmental

When you are finished working with a file stream, you use the ____ function to ensure that the file does not keep taking up space in your computer's memory.

fclose()

What function returns a value of true when the file pointer reaches the end of the file?

feof()

Every time you use the ____ function, the file pointer moves to the next character in the file.

fgetc( )

With the exception of the ____ function, each time you call a function that iterates through a text file, the file pointer automatically moves to the next line in the text file.

fgetc()

The ____ function returns a Boolean value of true if a given value exists in the array.

in_array

PHP scripts that are included in a Web template often begin with a prefix of ____.

inc

The ____ is a special type of variable that refers to the currently selected element in an array.

internal array pointer

To perform a reverse sort on an associative array by key and maintain the existing keys, use the _____ function.

krsort( )

To sort an associative array by key, use the ____ function.

ksort()

The ____ argument of the fwrite() function allows you to specify the maximum number of bytes that should be written.

length

The PHP feature that automatically adds a backslash to any single quote, double quote, or NULL character contained in form data that a user submits to a PHP script is ____.

magic quotes

In PHP, a(n) e-mail message is sent using the ____ function.

mail()

You can create ____ that consist of multiple indexes or keys.

multidimensional arrays

The value of the method attribute will be either post or get.

name/value

When you click a form's submit button, each field on the form is sent to the Web server as a ____ pair.

name/value

The data values for input elements that use array notation for the value of the name attribute are stored in a ____ array within the $_POST autoglobal array.

nested

The two arguments required for the rename() function are ____.

old_name,new_name

The array_unshift() function adds ____ element(s) to the beginning of the array.

one or more

The ____ function displays the elements of the $_ENV array and their values.

phpinfo()


Related study sets

AAPC Chapter 19 A & B Questions & Answers

View Set

Chapter 10 Part 1: The Nervous system's Sensory System Study Question

View Set

Practice Exam - Fundamental Concepts

View Set

2.5 Translators And Facilities Of Languages

View Set