PHP Test 7 What is the out put. $x=array("aaa","ttt","www","ttt","yyy","tttt"); $y=array_count_values($x); echo $y[ttt]; 2 3 1 4 How do you get information from a form that is submitted using the "get" method? $_POST[]; Request.QueryString; Request.Form; $_GET[]; What's the best way to copy a file from within a piece of PHP? Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows) Use the built in copy() function Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero Print out a message asking your user to "telnet" in to the server and copy the file for you PHP code is embedded directly into XHTML document? False True Is it possible to submit a form with out a submit button? Yes No Full form of PHP. PostHypertextProcessor Hypertext Postprocessor HypertextPreprocessor PreHypertextProcessor What is the expansion of LAMP? Linux Apache Mysql Php Linux And Mysql Php In php Which method is used to getting browser properties? $_SERVER['HTTP_VARIENT'] $_SERVER['SERVER_NAME'] $_SERVER['HTTP_USER_AGENT']; $_SERVER['PHP_SELF'] Which of the following function is used to pick one or more random values from PHP Array? array_rand() Rand_array() array_random() Random_array() What is the out put. $x=array(1,3,2,3,7,8,9,7,3); $y=array_count_values($x); echo $y[8]; 43 8 6 1 Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used $_SERVER['PHP_SELF'] function in your page, then what is the return value of this function? index.php c:/apache/htdocs/phptutor/index.php /phptutor/index.php phptutor/index.php Which operator is used to concatenate two strings in php? plus operator (+) dot operator (.) Are there regular expressions in PHP? No - PHP uses "glob" style matching only Yes - regular expressions use the POSIX standard Yes - PHP supports two different types of regular expressions: POSIX-extended and Perl-Compatible Regular Expressions (PCRE). Yes - regular expressions use Perl-like conventions In PHP, which of the following function is used to insert content of one php file into another php file before server executes it include[] #include() #include{} include() What will be the ouput of below code ? Assume that today is 2009-5-19:2:45:32 pm $today = date("F j, Y, g:i a"); May 19,2009,14:45:32 PM May 19,2009,14:45:32 pm may 19,09,2:45:32 PM May 19, 2009, 2:45 pm Which of the following function is used for terminate the script execution in PHP? die() break() quit() What function used to print statement in PHP? printf echo(); "" What will be the ouput of below code? define("x","5"); $x=x+10; echo x; 15 5 10 Error What will be the output of below code? $arr = array(5 => 1, 12 => 2); $arr[] = 56; $arr["x"] = 42; unset($arr); echo var_dump($arr); x=42 Null 56 42 PHP variables are Trible type variables Double type variables Multitype variables Single type variable Schreibe einen Kommentar Antworten abbrechenDu musst angemeldet sein, um einen Kommentar abzugeben.