1.What is the difference between the functions unlink and unset?
Ans: unlink() deletes the given file from the file system.
unset() makes a variable undefined.
2.How can we register the variables into a session?
Ans: $_SESSION[’name’] = “Mizan”;
3.How can we get the properties (size, type, width, height) of an image using PHP image functions?
Ans: To know the Image type use exif_imagetype () function
To know the Image size use getimagesize () function
To know the image width use imagesx () function
To know the image height use imagesy() function t
4.How can we get the browser properties using PHP?
Ans: By using $_SERVER['HTTP_USER_AGENT'] variable.
5.What is the maximum size of a file that can be uploaded using PHP and how can we change this?
Ans: By default the maximum size is 2MB. and we can change the following setup at php.iniupload_max_filesize = 2M
6.How can we increase the execution time of a PHP script?
Ans: by changing the following setup at php.inimax_execution_time = 30; Maximum execution time of each script, in seconds
7.How can we optimize or increase the speed of a MySQL select query?
Ans: 1.first of all instead of using select * from table1, use select column1, column2, column3.. from table1
2.Look for the opportunity to introduce index in the table you are querying.
3.use limit keyword if you are looking for any specific number of rows from the result set.
8.How can we register the variables into a session?
Ans: session_register($session_var);
$_SESSION['var'] = 'value';
9.What is the difference between characters \023 and \x23?
Ans: The first one is octal 23, the second is hex 23.
10.How many ways can we get the value of current session id?
Ans: session_id() returns the session id for the current session.
Ans: unlink() deletes the given file from the file system.
unset() makes a variable undefined.
2.How can we register the variables into a session?
Ans: $_SESSION[’name’] = “Mizan”;
3.How can we get the properties (size, type, width, height) of an image using PHP image functions?
Ans: To know the Image type use exif_imagetype () function
To know the Image size use getimagesize () function
To know the image width use imagesx () function
To know the image height use imagesy() function t
4.How can we get the browser properties using PHP?
Ans: By using $_SERVER['HTTP_USER_AGENT'] variable.
5.What is the maximum size of a file that can be uploaded using PHP and how can we change this?
Ans: By default the maximum size is 2MB. and we can change the following setup at php.iniupload_max_filesize = 2M
6.How can we increase the execution time of a PHP script?
Ans: by changing the following setup at php.inimax_execution_time = 30; Maximum execution time of each script, in seconds
7.How can we optimize or increase the speed of a MySQL select query?
Ans: 1.first of all instead of using select * from table1, use select column1, column2, column3.. from table1
2.Look for the opportunity to introduce index in the table you are querying.
3.use limit keyword if you are looking for any specific number of rows from the result set.
8.How can we register the variables into a session?
Ans: session_register($session_var);
$_SESSION['var'] = 'value';
9.What is the difference between characters \023 and \x23?
Ans: The first one is octal 23, the second is hex 23.
10.How many ways can we get the value of current session id?
Ans: session_id() returns the session id for the current session.
Previous | Next |
:: Click the links below for similar type Questions and answers ::
0 comments:
Post a Comment