Correct Answer: setcookie('variable','value','time'); variable - name of the cookie variable value - value of the cookie variable time - expiry time Example: Test - cookie variable name $i - value of the variable 'Test' time()+3600 - denotes that the cookie will expire after an one hour
3. How can we know the number of days between two given dates using php?
Correct Answer: Array Descriptions -------------------------------- ----------------------------------- $_FILES['userfile']['name'] The original name of the file on the client machine $_FILES['userfile']['type'] The MIME type of the file if the browser provided this information An example would be "image/gif" $_FILES['userfile']['size'] The size, in bytes, of the uploaded file $_FILES['userfile']['tmp_name'] The temporary filename of the file in which the uploaded file was stored on the server $_FILES['userfile']['error'] The error code associated with this file upload
Correct Answer: CONSTRUCTOR : PHP allows developers to declare constructor methods for classes Classes which have a constructor method call this method on each newly-created object, so it is suitable for any initialization that the object may need before it is used DESTRUCTORS : PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++ The destructor method will be called as soon as all references to a particular object are removed or when the object is explicitly destroyed or in any order in shutdown sequence
Correct Answer: A PHP filter is used to validate and filter data coming from insecure sources To test, validate and filter user input or custom data is an important part of any web application The PHP filter extension is designed to make data filtering easier and quicker
9. What is Apache configuration file typically called?