PhP Flashcards

1
Q

The HTP response for a dynamic web page is passed

A

from the web server to the browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what part of a URL identifies the web server that an HTTP request will be sent to?

A

Domain name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what extension of a filename is typically associated with a static WEB page?

A

.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The HTTP response for a dynamic web page is passed

A

from the web server to the browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

To view the source code for web page in web browser, you can display the view page source command by

A

right-clicking on the page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following is not a database server that can be used for dynamic web pages?

A

Python since Oracle , MySQL and SQL server are database servers from the dynamic web pages and not since its a language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following is used to make websites available to other computers over a network

A

A web server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What type of web pages are generated by PHP scripts that are running on the web server

A

dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What software does a client use to access the web server where a web application resides

A

A web browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What type of web pages are generated PHP scripts are running on the web server.

A

dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

which of the following software components generates the html that is

A

chrome

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Google Chrome

A

web browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following is NOT a database server that can be used for dynamic Web pages.

A

Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When the web server recieves an HTTP request for a PHP page, the web server calls the

A

PHP intrpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what part of a URL identifies the web server that an HTTP request will be sent to

A

Domain name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following software components generates the HTML that is returned in an HTTP response

A

PHP

17
Q

Which HTML tag or element is used to load an external stylesheet

A

Link

18
Q

To print a variable with the echo statement, you simply pass the variable name to the echo statement. For example:

A

echo $VotingAge;

19
Q

A php variable name

A

is case-sensitive

20
Q

The _________ operator divides one operator divides one operand and returns the remainder

A

Modulus

21
Q

To round and format the value of a variable named $number to 3 decimal places and store it in a variable named $number_formatted, you code

A

$number_formatted = number_format($number, 3);

22
Q

How many times will the for loop that follows be executed?

$years = 25;
for ($i = 1; $i < $years; $i++) {
$future_value =
($future_value + ($future_value * $interest_rate));

A

24 because $i needs to be less than years(25) to continue the for statement

23
Q

You can use the htmlspecialchars() function to

A

Protect XSS attacks

24
Q

What will the variable $name contain after the code that follows is executed?
$first_name = ‘Bob’;
$last_name=’Roberts’;
$name = “Name: $first_name”;

A

Name: Bob

25
Q

In the code that follows, if $error_message isn’t empty
if ($error_message != ‘’) {
include(‘index.php’);
exit();
}

A

control is passed to a page named index.php that’s in the current directory

26
Q

In PHP include means to integrate another file of code possibly another PHP file inside of a PHP file EX:

A

if( $error_message == ‘’) {
include(“future_value_form.php”);
exit();
}

27
Q

In html a numbered list is coded with

A

<ol> then <li> to list
</li></ol>

28
Q

Which of the following should you do to provide accessibility for an <a> element? Code an alt attribute that shows where the link is going</a>

A

The img element that follows <p><img src=”../images/logo.gif” alt=”Murach Logo” ></p>
Displays “Murach Logo” if the image can’t be found

29
Q

<nav>
<ul>
<li>October: <a href=”speakers/brancaccio.html”>David Brancaccio</a></li>
<li>November: <a href=”speakers/sorkin.html”>Andrew Ross Sorkin</a></li>
</ul>
</nav>

When this HTML code is rendered in a browser, what is the first link that will be displayed?

A

David Branaccio

30
Q
A