MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
PHP
HTML Forms Handling
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
PHP sessions are created using the . . . . . function.
session_starts()
sessions_start()
session_start()
none of above
Q.2
When you want to store user data in a session use the . . . . array.
$_SESSION
SYS_SESSION
$SESSION
$_SESSIONS
Q.3
Sessions allow you to.
store persistent user preference on a site
save user authentication information from page to page
create multipage forms
all of above
Q.4
To process the file, you need to break the array from $_FILES into individual values. You can do this using the ________ function.
divide()
list()
break()
indi()
Q.5
Before you try to process the file, you need to make sure that your $err value is equivalent to _________
UPLOAD_ERR_OK
UPLOAD_NO_ERR
UPLOAD_ERR_NO_OK
UPLOAD_ERR
Q.6
You use the $_SERVER superglobal and your _______ property to create your path to check.
$load_dir
$load
$save
$save_dir
Q.7
A snapshot of the session data can be taken at any time and written out to a file.
True
False
Q.8
When the session data is written to a file, it can be read back, decoded and applied to the current session using the . . . . function.
session_reset()
session_get_cookie_params()
session_encode()
session_decode()
Q.9
Which function do you have to use to check whether the $path you’ve stored exists?
path_dir()
path()
is_dir()
path_dir()
Q.10
Which one of the following is true about the following line – $obj = new ImageHandler(‘/images/’, array(400, 300));
This snippet sets the maximum dimensions allowed to 400 pixels wide by 300 pixels high
This snippet sets the minimum dimensions allowed to 300 pixels wide by 400 pixels high
This snippet sets the minimum dimensions allowed to 400 pixels wide by 300 pixels high
This snippet sets the maximum dimensions allowed to 300 pixels wide by 400 pixels high
Q.11
Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ________
.htaccess
function.inc.php
index.php
admin.php
Q.12
When you’re uploading files you need to set the enctype of the form to __________
text
text/file
multipart/form-data
multimedia/form-data
Q.13
To check whether a file was uploaded, you look in the _______ superglobal array.
$_FILES
$_DOCS
$_DOCUMENTS
$_FOLDERS
Q.14
To make the ImageHandler class portable you should create a separate file for it called __________
imagehandler.inc.php
images.inc.php
handler.inc.php
imghandler.inc.php
Q.15
DocBlocks are indicated by opening a comment using _________
/*
//*
/**
/*/
Q.16
Which parameter determines whether the old session file will also be deleted when the session ID is regenerated?
delete_old_file
delete_old_session
delete_old_session_file
delete_session_file
Q.17
Which function effectively deletes all sessions that have expired?
session_delete()
session_destroy()
session_garbage_collect()
session_expired_delete()
Q.18
Which function is used to erase all session variables stored in the current session?
session_destroy()
session_change()
session_remove()
session_unset()
Q.19
What will the function session_id() return is no parameter is passed?
Current Session Identification Number
Previous Session Identification Number
Last Session Identification Number
Error
Q.20
Which function is used to transform PHP’s session-handler behavior into that defined by your custom handler?
session_set_save()
session_set_save_handler()
Session_handler()
session_save_handler()
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page