Rebecca Walton
Test por , creado hace más de 1 año

Sanchez, L. (2017). Web Programming with HTML, CSS, Bootstrap, JavaScript, JQuery, PHP, and MySQL . CreateSpace Independent Publishing Platform.

20
0
0
Rebecca Walton
Creado por Rebecca Walton hace más de 4 años
Cerrar

Chapter 6: PHP

Pregunta 1 de 16

1

All PHP statements should be surrounded by which delimiters?

Selecciona una de las siguientes respuestas posibles:

  • <php> and </php>

  • <script> and ></script>

  • <script><php> and </php></script>

  • <?php and ?>

Explicación

Pregunta 2 de 16

1

A PHP statement is terminated with which symbol?

Selecciona una de las siguientes respuestas posibles:

  • <end>

  • .

  • ;

  • ?

Explicación

Pregunta 3 de 16

1

All variables in PHP start with which symbol?

Selecciona una de las siguientes respuestas posibles:

  • ?

  • .

  • var

  • $

Explicación

Pregunta 4 de 16

1

In PHP, $content = "<p>Hello World</p>". Write a PHP statement that displays the content on the browser screen.

Selecciona una de las siguientes respuestas posibles:

  • display($content);

  • echo$content;

  • echo "Hello World";

  • echo content;

Explicación

Pregunta 5 de 16

1

In PHP, you can use either single quotes ('This is a string') or double quote ("This is a string") for strings.

Selecciona una de las siguientes respuestas posibles:

  • true

  • false

Explicación

Pregunta 6 de 16

1

In PHP, which of the following is the correct way to comment a single line?

Selecciona una de las siguientes respuestas posibles:

  • <!--This is a line of comment-->

  • <comment>This is a line of comment</comment>

  • <?php This is a line comment?>

  • //This is a line of comment

Explicación

Pregunta 7 de 16

1

In PHP, which of the following is NOT a correct variable name?

Selecciona una de las siguientes respuestas posibles:

  • $3val

  • $val3

  • $val_3

  • $val_of_3

Explicación

Pregunta 8 de 16

1

In PHP, how do you add 1 to a variable called $i?

Selecciona una de las siguientes respuestas posibles:

  • i++

  • i=+1;

  • ++$i;

  • ++i;

Explicación

Pregunta 9 de 16

1

How does PHP receive the information from an HTML form that is submitted using he "post" method? Suppose in HTML there's a text box <input type="text"name="userinput">

Selecciona una de las siguientes respuestas posibles:

  • $_POST["userInput"];

  • $_GET["userInput"];

  • $_USERINPUT();

  • $_GET(userInput);

Explicación

Pregunta 10 de 16

1

When using the get method to submit an HTML form to a PHP file, the variables are displayed in the URL

Selecciona una de las siguientes respuestas posibles:

  • true

  • false

Explicación

Pregunta 11 de 16

1

Which of the following is a correct way to create and array in PHP?

Selecciona una de las siguientes respuestas posibles:

  • $grades = array (78, 87, 95, 53);

  • $grades = (56, 78, 89, 90);

  • $grades = array ([56], [67], [78], [89]);

  • $grades = {56, 67, 78, 89};

Explicación

Pregunta 12 de 16

1

Write a PHP statement to include a file called "footer.inc"

Selecciona una de las siguientes respuestas posibles:

  • <!--include file = "footer.inc"-->

  • <?php include file = "footer.inc";?>

  • <?php include "footer.inc";?>

  • <?php include: "footer.inc;?>

Explicación

Pregunta 13 de 16

1

In PHP, how do you retrieve the content from a file called feedback.txt and store the content in an array call $fileContent?

Selecciona una de las siguientes respuestas posibles:

  • $fileContent = "feedback.txt";

  • $fileContent = php_read("feedback.txt");

  • $fileContent = file("feedback.txt");

  • $fileContent = file_read("feedback.txt");

Explicación

Pregunta 14 de 16

1

In PHP file upload in regards to security, which of the following is a true statement?

Selecciona una de las siguientes respuestas posibles:

  • Do not allow file uploads

  • It is safe as long as you don't allow .exe file upload

  • It is safe as long as the file size is small

  • It is safe as long as only an account holder can upload a file

Explicación

Pregunta 15 de 16

1

In PHP what will $i+=2 do?

Selecciona una de las siguientes respuestas posibles:

  • a typo

  • the value in the variable $i is increased by 2

  • the vriable $i now equals to 2

  • the value in the variable i is increased by 2

Explicación

Pregunta 16 de 16

1

In PHP a session is used so that the server can remember the browser

Selecciona una de las siguientes respuestas posibles:

  • true

  • false

Explicación