sd2 Flashcards
In PHP, variable names must begin with a &
A. True
B. False
B. False
This is a valid PHP statement: echo ‘This is a line of text’;
A. True
B. False
A. True
To make a valid statement that displays a double quote we would do something like this: it with a “/” This is a valid PHP statement:
B. False
The HTML protocol allows clients and servers to communicate.
A. True
B. False
B. False
Which port is commonly used by servers for web communications? A. 80 B. 25 C. 8080 D. None of the above
A. 80
The term for ipaddress:port is: A. localhost B. default address C. socket D. connection
C. Socket
To begin a block of PHP code we use the tag: “
B. False
This is a valid single line PHP comment: // this is a comment
A. True
B. False
A. True
Which command defines the accesses a user will have: A. ACCESS B. SET ACCESS C. GRANT D. USER
C. Grant
The main reason we put connect_db in an include file is to avoid duplicating the code in multiple files.
A. True
B. False
B. False
The MYSQL_CONNECT function allows PHP to connect to a database.
A. True
B. False
B. False
The elements of an array are defined by brackets, for example: $thisarray[45]
A. True
B. False
A. True
The first two elements of an array name $thisarray would be $thisarray[1] and $thisarray[2]
A. True
B. False
B. False
For the function - mysqli_query ( $dbc , $q) - $dbc is set to the database name.
A. True
B. False
B. False
The PING command displays all the hops from one host to another host.
A. True
B. False
B. False
Which command will exit a PHP program? A. END B. DIE C. QUIT D. None of the above
B. Die
To reference a file in a parent folder, we preface the filename with \_\_\_\_\_\_\_\_\_. A. C:\ B. C:\SD2 C. C:\SD2\ D. ..\
D. ..\
What is the result of 10%3? A. 0 B. 1 C. 3 D. None of the above
B. 1
What PHP command creates a constant? A. CONSTANT B. DEFINE C. IDENTIFY D. None of the above
B. Define
The first character after the & must be a number or a _
A. True
B. False
B. False
To concatenate strings separate with a period place in double quotes
A. True
B. False
A. True
Echo with double quotes does not do variable substitution
A. True
B. False
B. False
Even if you set an element a second time, it will not overwrite that element.
A. True
B. False
B. False
The following statement will ALWAYS be true: if ($x =5)
A. True
B. False
A. True