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
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: 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
4. How to store the uploaded file to the final location?
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
Correct Answer: The header() function sends a raw HTTP header to a client We can use header() function for redirection of pages It is important to notice that header() must be called before any actual output is seen
10. How we get IP address of client,previous reference page etc?