Website And Web Server Programming Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Roadman1977
R
Roadman1977
Community Contributor
Quizzes Created: 1 | Total Attempts: 74
| Attempts: 74
SettingsSettings
Please wait...
  • 1/10 Questions

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

    • Http://localhost:8000
    • Http://localhost8000
    • Http://localhost.8000
Please wait...
About This Quiz


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

Website And Web Server Programming Quiz - Quiz

Quiz Preview

  • 2. 

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

    • Named.conf

    • Rc.local

    • Httpd.conf

    Correct Answer(s)
    A. Rc.local
    A. 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.

    • HTTP

    • State information

    Correct Answer
    A. 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?

    • Hidden form fields

    • Query strings

    • Functions

    • Cookies

    Correct Answer
    A. 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.

    • Open_connect()

    • Connection_mysqli()

    • Mysqli_connect()

    • Open_mysqli()

    Correct Answer
    A. 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.

    • Query string

    • Function

    • Auto-global

    • 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.

    • Value

    • Name

    • Expires

    • Path

    Correct Answer
    A. 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 __________

    • Script

    • Autoglobal

    • Function

    • Cookie

    Correct Answer
    A. 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"?

    • $Color = setcookie("blue");

    • Setcookie("blue","color");

    • Setcookie("color","blue");

    • Setcookie("blue");

    Correct Answer
    A. 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 __________

    • The IP address of www.leetechnology.com

    • The host name of www.leetechnology.com

    • The host name of my computer

    • 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 (Updated): Jun 6, 2023 +

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.