Describe two main features of the SVG file format. (2) What does it mean that PH
ID: 3591368 • Letter: D
Question
Describe two main features of the SVG file format. (2)
What does it mean that PHP is dynamically typed? (2)
What are server-side include files? Why are they important in PHP? (2)
Can we have two functions with the same name in PHP? Why or why not? (2)
How do we define default function parameters in PHP? Provide an example. (3)
What are the superglobal arrays in PHP? (2)
Briefly describe two techniques for reading or writing files in PHP. (2)
Why must you always sanitize user inputs before using them in your queries? (2)
Briefly describe any two database API options available in PHP when connecting to a MySQL database. (3)
NOTE: The assignment should be completed individually. Read the textbook or related online material and answer in your own words. Please do not copy and paste from book, online, or others’ work.
Explanation / Answer
1)SVG is a tye pr of file format and it stands for Scalable Vector Graphics
Features:
It defines graphics in XML format.
By using this there is no lose of quality even they are zoomed.
2)PHP is generally dynamic typing because it doesn't associate with the values that are strictly specific type, but designed decides type of a value at runtime.
3)SSI is a simple interpreted scripting language at server-side which is used almost for the Web.mainly used to include the contents of files into a web server.
4)No.Becuase of PHP is a dynamically typed language it is not possible.
5)In PP, we can create default parameters,hence while parameter is not passed through the function it is still available within the function. These are also called optional parameters because they don't pass.
Syntax:
function def($x= 1)
{
return $x;
}
6)In PHP there are some predefined variables which are "superglobals". They are always accessible,without need of scope and accessable to any function or class.
They areare:
$GLOBALS
$_SERVER
$_REQUEST
$_POST
$_GET
$_FILES
$_ENV
$_COOKIE
$_SESSION
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.