Unit- 2
Q.1)------is
a superglobal that holds information regarding HTTP headers, path and script
location etc.
A)$_SERVER
B) SERVER_ADDR
C)
SERVER_NAME
D) QUERY_STRING
Ans :A
Q.2)All the
server and execution environment related information is available in
this------
A)associative
array
B)
SERVER_ADDR
C)
SERVER_NAME
D) QUERY_STRING
Ans :A
Q.3)-------This
property of array returns The IP address of the server under which the current
script is executing.
A)$_SERVER
B)
SERVER_ADDR
C)
SERVER_NAME
D) QUERY_STRING
Ans :B
Q.4)-------Name
of server hostunder which the current script is executing
A)$_SERVER
B)
SERVER_ADDR
C)
SERVER_NAME
D) QUERY_STRING
Ans :C
Q.5)-------A
query string is the string of key=value pairs separated by & symbol and
appended to URL after ? symbol. For example,
http//localhost/testscript?name=xyz&age=20 URL returns trailing query
string.
A)$_SERVER
B)
SERVER_ADDR
C)
SERVER_NAME
D) QUERY_STRING
Ans :D
Q.6)--------HTTP
request method used for accessing a URL, such as POST, GET, POST, PUT or
DELETE.
A)
REQUEST_METHOD
B)
DOCUMENT_ROOT
C)
REMOTE_ADDR
D) SERVER_PORT
Ans :A
Q.7)-----------returns
name of directory on server that is configured as document root
A)
REQUEST_METHOD
B) DOCUMENT_ROOT
C)
REMOTE_ADDR
D) SERVER_PORT
Ans :B
Q.8)------------IP
address of machine from which the user is viewing the current page
A)
REQUEST_METHOD
B)
DOCUMENT_ROOT
C)
REMOTE_ADDR
D) SERVER_PORT
Ans :C
Q.9)-------port
number on which the web server is listening to incoming request
A)
REQUEST_METHOD
B)
DOCUMENT_ROOT
C)
REMOTE_ADDR
D) SERVER_PORT
Ans :D
Q.10)there
are two ways the browser client can send information to the web server . The
------------Method & The---------- Method
A) info and
pre method
B) Get and
post method C) implement and extend method
D) none of these.
Ans :A
Q.11)Before
the browser sends the information to the server , it encodes it using a scheme
called URL.
A)yes
B)no
C)can not
say
D)none of
these.
Ans :A
Q.12)After
the information is encoded it is sent to the server Spaces are removed and
replaced with the + character and any other non alphanumeric characters are
replaced with a hexadecimal values.
A)yes
B)no
C)can not
say
D)none of
these.
Ans :A
Q.13)The-----method
sends the encoded user information appended to the page request. The page and
the encoded information are separated by the ? character
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :B
Q.14)The-----method
produces a long string that appears in your server logs, in the browser's
Location
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :A
Q.15)The-----method
is restricted to send upto 1024 characters only
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :A
Q.16)Never
use-----method if you have password or other sensitive information to be sent
to the server.
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :A
Q.17)------can't
be used to send binary data, like images or word documents, to the server
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :A
Q.18)The
data sent by GET method can be accessed using-------environment variable.
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :D
Q.19)The PHP
provides-------associative array to access all the sent information using GET
method.
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :A
Q.20)PHP------is
a PHP super global variable which is used to collect form data after submitting
an HTML form with method="get".
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :A
Q.21)The-----method
transfers information via HTTP headers.
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :C
Q.22)The
information is encoded as described in case of GET method and put into a header
called----
-------.
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :D
Q.23)The----------method
does not have any restriction on data size to be sent.
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :C
Q.24)The-----------method
can be used to send ASCII as well as binary data
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :C
Q.25)The PHP
provides----------associative array to access all the sent information using
POST method.
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :B
Q.26)PHP--------is
a PHP super global variable which is used to collect form data after submitting
an
HTML form
with method="post". $_POST is also widely used to pass variables
A)$_GET
B)$_POST
C)POST
D)QUERY_STRING
Ans :B
Q.27)The-----method
can retrieve information identified by the request-URl (Uniform Resource
Identifier)
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.28)Use-----when
you need the server, which controls URL generation of your resources
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.29)------is
a secure method as its requests do not remain in browser history.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.30)By the
used of-------method You can keep the data private.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.31)--------can't
be used to send word documents or images.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.32)----------requests
can be used only to retrieve data
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.33)The----------method
cannot be used for passing sensitive information like usernames and passwords.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.34)If you
use------method, the browser appends the data to the URL
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.35)You
cannot see------requests in browser history while You can see GET requests in
browser history
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.36)This------method
is not compatible with some firewall setups.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.37)In-------method,
values are visible in the URL while in POST method, values are NOT visible in
the URL.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.38)------has
a limitation on the length of the values, generally 255 characters
A)$_GET
B)$_POST
C)POST
D)GET
Ans :D
Q.39)-------has
no limitation on the length of the values since they are submitted via the body
of HTTP.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.40)GET
method supports only string data types while-----method supports different data
types, such as string, numeric, binary, etc
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.41)GET
request is often cacheable while-----request is hardly cacheable.
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.42)------inputs
are auto-filling inputs after submitting
A)$_GET
B)$_POST
C)STICKY
D)GET
Ans :C
Q.43)GET
method supports only string data types while-------method supports different
data types, such as string, numeric, binary, etc
A)$_GET
B)$_POST
C)POST
D)GET
Ans :C
Q.44)there
are two ways the browser client can send information to the web server . The GET Method & The POST Method
A)yes
B)no
C)can not
say
D) none of
these.
Ans :A
Q.45)The-----method
is restricted to send upto 1024 characters only
A)GET
B)?
C)POST
D)QUERY_STRING
Ans :A
Q.46)Never
use GET method if you have password or other sensitive information to be sent
to the server.
A)yes
B)no
C)can not
say
D) none of
these.
Ans : A
Q.47)GET
can't be used to send binary data, like images or word documents, to the
server
A)yes
B)no
C)can not
say
D) none of
these.
Ans :A
Q.48)The
data sent by GET method can be accessed using QUERY_STRING environment
variable.
A)yes
B)no
C)can not
say
D) none of
these.
Ans :A
Q.49)The
POST method can be used to send ASCII as well as binary data
A)yes
B)no
C)can not
say
D) none of
these.
Ans :A
Ans : A
Q.50)The PHP
provides $_POST associative array to access all the sent information using POST
method.
A)yes
B)no
C)can not
say
D) none of
these.
Ans : A
Q.51)PHP
$_POST is a PHP super global variable which is used to collect form data after
submitting an HTML form with method="post". $_POST is also widely
used to pass variables
A)yes
B)no
C)can not say
D) none of
these.
Ans :A
Q.52)The GET
method can retrieve information identified by the request-URl (Uniform Resource
Identifier)
A)yes
B)no
C)can not
say
D) none of
these.
Ans :A
Q.53)Use
POST when you need the server, which controls URL generation of your
resources
A)yes
B)no
C)can not
say
D) none of these.
Ans :A
Q.54)The GET
method is restricted to send upto------characters only
A)1024
B)1000
C)255
D)1056
Ans :A
0 Comments