Php Interview Question and Answers

33. How can you set a limit on the size of upload files for all forms and scripts?
  The php.ini option upload_max_filesize determines the maximum size of an upload file that any script will accept. It is set to 2MB by default.
 
Your Name Your Email-ID
Your Answer
34. What does the system() function do with the output from an external command it executes?
  The system() function prints the output of the external command directly to the browser.
 
Your Name Your Email-ID
Your Answer
35. Which function could you use to check the validity of a date?
  You can check a date with the checkdate() function.
 
Your Name Your Email-ID
Your Answer
36. What are the Options to Transfer Session IDs?
  Once a new session is created, its session ID must be transferred to the client browser and included in the next client request, so that the PHP engine can find the same session created by the same visitor. The PHP engine has two options to transfer the session ID to
  • the client browser: As URL parameter - The Session ID will be embedded in all URLs in the HTML document delivered to the client browser. When the visitor clicks any of those URLs, the session ID will be returned back to the Web server as part of the requesting URL.
  • as a cookie - The session ID will be delivered as a cookie to the client browser. When visitor requests any other pages on the Web server, the session ID will be returned back to the Web server also as a cookie.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 9 of 10