Question Bank

1899 approved questions from the community

Which superglobal variable is used to store and retrieve session data in PHP?

MEDIUM
SINGLE CHOICE
25s
PHP
by Mohamed

What function must be called at the beginning of a PHP script to initialize a session?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

Cookies are stored on the server side.

MEDIUM
TRUE FALSE
20s
PHP
by Mohamed

PHP constants can only store string values.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

What is the purpose of the `req.originalUrl` property?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

The `res.location()` method sets the Location header but does not send a response.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

The `req.secure` property indicates whether the request was made over HTTPS.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

How do you set custom HTTP response headers in Express.js?

MEDIUM
SINGLE CHOICE
30s
Express
by Mohamed

What is the purpose of the `req.baseUrl` property?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

The `res.attachment()` method sets the Content-Disposition header to trigger file downloads.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

What does the morgan middleware do in Express.js?

MEDIUM
SINGLE CHOICE
30s
Express
by Mohamed

What is the purpose of the express-validator package?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

Express.js applications should always use HTTPS in production environments.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

The order of middleware registration matters in Express.js.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

Express.js automatically parses all types of request bodies without any middleware.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

What is the purpose of the helmet middleware in Express.js?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

Express.js applications should use environment variables for configuration in production.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

The `app.set()` method in Express.js is used to assign application settings.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

What is the purpose of the `app.route()` method in Express.js?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

How do you set response headers in Express.js?

MEDIUM
SINGLE CHOICE
30s
Express
by Mohamed
PreviousPage 29 of 95Next