Time remaining
:
:
Test Status
PHPTEST8
Ques 1 :
A variable $word is set to "HELLO WORLD", which of the following script returns in title case?
(A) echo ucwords($word.)
(B) echo ucfirst($word).
(C) echo ucwords(strtolower($word).
(D) echo ucfirst(strtolower($word).
Ques 2 :
The difference between include() and require()
(A) is include() produced a Fatal Error while require results in a Warning
(B) both are same in every aspects
(C) are different how they handle failure
(D) None of above
Ques 3 :
Which of the following method sends input to a script via a URL?
(A) Get
(B) Post
(C) Both
(D) None
Ques 4 :
Which of the following method is suitable when you need to send larger form submissions?
(A) Get
(B) Post
(C) Both Get and Post
(D) There is no direct way for larger form. You need to store them in a file and retrieve
Ques 5 :
Which of the following mode of fopen() function opens a file only for writing. If a file with that name does not exist, attempts to create anew file. If the file exist, place the file pointer at the end of the file after all other data.
(A) W
(B) W+
(C) A
(D) A+
Ques 6 :
The function setcookie( ) is used to
(A) Declare cookie variables
(B) Store data in cookie variable
(C) Enable or disable cookie support
(D) All of above
Ques 7 :
To work with remote files in PHP you need to enable
(A) allow_url_fopen
(B) allow_remote_files
(C) both of above
(D) none of above
Ques 8 :
In mail($param1, $param2, $param3, $param4), the $param2 contains
(A) The message
(B) The header
(C) The recipient
(D) The subject
Ques 9 :
mysql_connect( ) does not take following parameter.
(A) database name
(B) database host
(C) user ID
(D) password
Ques 10 :
Study following steps and determine the correct order.
(1) Open a connection to MySql server
(2) Execute the SQL query
(3) Fetch the data from query
(4) Select database
(5) Close Connection
(A) 1, 5, 4, 2, 1
(B) 1, 4, 2, 3, 5
(C) 4, 1, 2, 3, 5
(D) 4, 1, 3, 2, 5
Ques 11 :
Which of the following is not a session function?
(A) session_destroy
(B) session_decode
(C) session_id
(D) session_pw
Ques 12 :
When uploading a file if the UPLOAD_ERR-OK contains value 0 it means.
(A) Uploaded file size is 0
(B) Uplaod is not successful, error occurred
(C) The file uploaded with success
(D) File upload progress is 0% completed
Ques 13 :
Which of the following delimiter syntax is PHP's default delimiter syntax.
a. <% %>
b. <?php?>
c. <? ?>
d. <script language="php"> </script>
(A) a
(B) b
(C) c
(D) d
Ques 14 :
Which of the following statement produce different output.
a. <P="This is php example"; ?>
b. <?echo "This is php example"; ?>
c. <?PHP echo "This is php example"; php?>
d. <script language="php"> print "This is php example";</script>
(A) a
(B) b
(C) c
(D) d
Ques 15 :
Php supports all four different ways of delimiting. In this context identify the false statement.
(A) You can use any of the delimiting style
(B) You can use any delimiting style but must use a single style consistently for a page
(C) You can use different delimiting styles in same page
(D) Variables declared in previous blocks are remembered on later blocks too!
Ques 16 :
Which of following commenting is supported by Php.
(A) Shell syntax - #
(B) Multiline Comment /* ------------- */
(C) Both of above
(D) None of above
Ques 17 :
To produce the output I love the summer time, Which of the following statement should be used?
a.
<?php print("<P>
I love the summer time
</p>");?>
b.
<?php
$season = "
summer time
"; print("<P>
I love the
$season
</p>"); ?>
c.
<?php $message = "
I love the $season"; echo $message; ?>
(A) a
(B) a and c
(C) a and b
(D) All of the above
Ques 18 :
What's the best way to copy a file from within a piece of PHP?
(A) Print out a message asking your user to "telnet" in to the server and copy the file for you
(B) Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero
(C) Use the built in copy() function
(D) Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows)
Ques 19 :
PHP code is embedded directly into XHTML document?
(A) False
(B) True
Ques 20 :
Is it possible to submit a form with out a submit button?
(A) Yes
(B) No
Submit Answer
Don't Refresh the Page !! ...