phpde4

Màu nền
Font chữ
Font size
Chiều cao dòng

1.      A script is a

a.       Program or sequence of instructions that is interpreted or carried out by processor directly

BB.      Program or sequence of instruction that is interpreted or carried out by another program

c.       Program or sequence of instruction that is interpreted or carried out by web server only

d.      None of above

3.      When compared to the compiled program, scripts run

a.       Faster

BB.      Slower

c.       The execution speed is similar

d.      All of above

4.      PHP is a widely used ……………. scripting language that is especially suited for web development and can be embedded into html

AA.       Open source general purpose

b.      Proprietary general purpose

c.       Open source special purpose

d.      Proprietary special purpose

5.      Which of the following is not true?

a.       PHP can be used to develop web applications.

b.      PHP makes a website dynamic.

c.       PHP applications can not be compiled.

DD.      PHP can not be embedded into html.

6.      The most portable version of PHP tag that is compatible to embed in XML or XHTML too is:

a.       <? ?>

b.      <script language=”php”> </script>

c.       <% %>

DD.     

7.      Which of the following variables is not a predefined variable?

a.       $get

BB.      $ask

c.       $request

d.      $post

8.      You can define a constant by using the define() function. Once a constant is defined

AA.       It can never be changed or undefined

b.      It can never be changed but can be undefined

c.       It can be changed but can not be undefined

d.      It can be changed and can be undefined

9.      The following piece of script will output:

<?

$email=’[email protected]’;

$new=strstr($email, ‘@&rsquo;

print $new;

?>

a.       admin

b.      admin@psexam

CC.       @psexam.com

d.      psexam.com

10. Which of the following function returns the number of characters in a string variable?

a.       count($variable)

b.      len($variable)

c.       strcount($variable)

DD.      strlen($variable)

11. When you need to obtain the ASCII value of a character which of the following function you apply in PHP?

a.       chr( );

b.      asc( );

CC.       ord( );

d.      val( );

12. A variable $word is set to “HELLO WORLD”, which of the following script returns in title case?

a.       echo ucwords($word)

BB.      echo ucwords(strtolower($word)

c.       echo ucfirst($word)

d.      echo ucfirst(strtolower($word)

13. The difference between include() and require()

AA.       are different how they handle failure

b.      both are same in every aspects

c.       is include() produced a Fatal Error while require results in a Warning

d.      none of above

14. When a file is included the code it contains, behave for variable scope of the line on which the include occurs

AA.       Any variable available at that line in the calling file will be available within the called file from that point

b.      Any variable available at that line in the calling file will not be available within the called file

c.       Variables are local in both called and calling files

d.      None of above

15. Which of the following method sends input to a script via a URL?

AA.       Get

b.      Post

c.       Both

d.      None

16. Which of the following method is suitable when you need to send larger form submissions?

a.       Get

BB      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

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

DD.      A+

18. The function setcookie( ) is used to

a.       Enable or disable cookie support

b.      Declare cookie variables

CC.       Store data in cookie variable

d.      All of above

19. To work with remote files in PHP you need to enable

AA.       allow_url_fopen

b.      allow_remote_files

c.       both of above

d.      none of above

20. fopen($file_doc,”r+&rdquo opens a file for

a.       reading

b.      writing

c.       none of above

D.      both of above

Bạn đang đọc truyện trên: Truyen2U.Pro