Website And Web Server Programming Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Roadman1977
R
Roadman1977
Community Contributor
Quizzes Created: 1 | Total Attempts: 65
Questions: 10 | Attempts: 67

SettingsSettingsSettings
Website And Web Server Programming Quiz - Quiz


Take this quiz and learn what it best for website and web server! Let's start this awesome programming quiz now!


Questions and Answers
  • 1. 

    If you create a virtual site at port 8000, how would you refer to it in a browser?

    • A.

      Http://localhost:8000

    • B.

      Http://localhost8000

    • C.

      Http://localhost.8000

    Correct Answer
    A. Http://localhost:8000
    Explanation
    To refer to a virtual site created at port 8000 in a browser, the correct URL would be "http://localhost:8000". The URL consists of the protocol (http), followed by the domain name (localhost), and the port number (8000) where the virtual site is hosted. This format allows the browser to establish a connection with the virtual site and display its content.

    Rate this question:

  • 2. 

    In order to create a new IP address in Linux, where would you store the new configuration?

    • A.

      Named.conf

    • B.

      Rc.local

    • C.

      Httpd.conf

    Correct Answer(s)
    B. Rc.local
    C. Httpd.conf
    Explanation
    The correct answer is rc.local, httpd.conf. In Linux, the rc.local file is commonly used to store system startup commands and scripts. By adding the necessary configuration for the new IP address in the rc.local file, it will be applied during the system startup process. On the other hand, httpd.conf is the configuration file for the Apache HTTP server, which is responsible for handling web server settings. While it may not be the most appropriate location for storing IP address configurations, it could potentially be used for specific cases involving web server IP addresses.

    Rate this question:

  • 3. 

    Stored information about a previous visit to a Web Site is called _______ information.

    • A.

      HTTP

    • B.

      State information

    Correct Answer
    B. State information
    Explanation
    State information refers to the stored information about a previous visit to a website. This can include data such as user preferences, login credentials, or session details. State information allows websites to personalize the user experience and remember specific information about the user's interactions. HTTP, on the other hand, is a protocol used for communication between web servers and clients, and is not directly related to storing information about previous visits.

    Rate this question:

  • 4. 

    Which of the following is not a tool for maintaining state information with PHP?

    • A.

      Hidden form fields

    • B.

      Query strings

    • C.

      Functions

    • D.

      Cookies

    Correct Answer
    C. Functions
    Explanation
    Functions in PHP are not specifically designed for maintaining state information. They are used to organize and reuse code, perform specific tasks, and return values. State information is typically managed using tools like hidden form fields, query strings, and cookies. Hidden form fields allow data to be passed between web pages without displaying it to the user. Query strings can store data in the URL itself. Cookies are used to store data on the user's computer.

    Rate this question:

  • 5. 

    To open a connection to a MySQL database server, use ________ in PHP.

    • A.

      Open_connect()

    • B.

      Connection_mysqli()

    • C.

      Mysqli_connect()

    • D.

      Open_mysqli()

    Correct Answer
    C. Mysqli_connect()
    Explanation
    To open a connection to a MySQL database server in PHP, the correct function to use is mysqli_connect(). This function establishes a connection to a MySQL database server using the MySQL Improved Extension (mysqli). It takes parameters for the server name, username, password, and database name, and returns a connection object that can be used to interact with the database.

    Rate this question:

  • 6. 

    One way to preserve information following a user's visit to a Web page is to append a _______ at the end of a URL.

    • A.

      Query string

    • B.

      Function

    • C.

      Auto-global

    • D.

      Identifier

    Correct Answer
    A. Query string
    Explanation
    A query string can be appended at the end of a URL to preserve information following a user's visit to a web page. It is a part of the URL that contains data in the form of key-value pairs. This data can be used to pass information to the server or to dynamically generate content on the web page. By including a query string in the URL, the information can be retained and accessed by the server or other scripts on the page.

    Rate this question:

  • 7. 

    You create a cookie by passing to the setcookie() function a required _________ argument and five optional arguments in PHP.

    • A.

      Value

    • B.

      Name

    • C.

      Expires

    • D.

      Path

    Correct Answer
    B. Name
    Explanation
    In PHP, when creating a cookie using the setcookie() function, the required argument is the name of the cookie. This argument specifies the name of the cookie and is necessary for creating a cookie. The function also accepts five optional arguments, including value, expires, and path, which can be used to set additional properties for the cookie. However, the name argument is mandatory and must be provided when creating a cookie.

    Rate this question:

  • 8. 

    You store session state information in the $_Session __________

    • A.

      Script

    • B.

      Autoglobal

    • C.

      Function

    • D.

      Cookie

    Correct Answer
    B. Autoglobal
    Explanation
    The correct answer is "autoglobal" because the session state information in PHP is stored in the $_SESSION superglobal variable. This variable is automatically available in all scripts once a session is started and can be used to store and retrieve session data across multiple pages or requests.

    Rate this question:

  • 9. 

    What is the correct syntax for creating a temporary cookie containing a value of "blue"?

    • A.

      $Color = setcookie("blue");

    • B.

      Setcookie("blue","color");

    • C.

      Setcookie("color","blue");

    • D.

      Setcookie("blue");

    Correct Answer
    C. Setcookie("color","blue");
    Explanation
    The correct syntax for creating a temporary cookie containing a value of "blue" is setcookie("color","blue"). This function is used to set a cookie in PHP, and it takes two parameters: the name of the cookie and its value. In this case, the name of the cookie is "color" and the value is "blue".

    Rate this question:

  • 10. 

    I am triying to reach a webserver, www.leetechnology.com.  A DNS response tells me __________

    • A.

      The IP address of www.leetechnology.com

    • B.

      The host name of www.leetechnology.com

    • C.

      The host name of my computer

    • D.

      The IP address of my computer

    Correct Answer
    A. The IP address of www.leetechnology.com
    Explanation
    The DNS response tells the user the IP address of the website they are trying to reach, which in this case is www.leetechnology.com.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jun 06, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 18, 2009
    Quiz Created by
    Roadman1977
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.