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: 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
2. How to store the uploaded file to the final location?
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
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
8. What is Apache configuration file typically called?
Correct Answer: 1 : InnoDB provides us row level locking while MyISAM provides us table level locking 2 : InnoDB offers foreign key constraints wheres in MyISAM does not have foreign key constraints 3 : InnoDB does not have full text search wheres MyISAM provides us full text search