Renata campus experience

Solo disponible en BuenasTareas
  • Páginas : 12 (2904 palabras )
  • Descarga(s) : 0
  • Publicado : 28 de febrero de 2011
Leer documento completo
Vista previa del texto
Md. Ruhul Amin(Tuhin)
Software Engineer MAOS Japan Bangladesh Ltd.
Website: Email: Mobile: 0176341107

Md. Mizanur Rahman(Jewel)
Software Engineer MAOS Japan Bangladesh Ltd.
Website: Email: Mobile: 0171025695

PHP Interview Question & Answer
1. What are the differences between GET and POST methods in formsubmitting, give the case where we can use get and we can use post methods? Answer: On the server side, the main difference between GET and POST is where the submitted is stored. The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method. On the browser side, the difference is that data submitted by the GET method will be displayed in thebrowser's address field. Data submitted by the POST method will not be displayed anywhere on the browser. GET method is mostly used for submitting a small amount and less sensitive data. POST method is mostly used for submitting a large amount or sensitive data. 2. Who is the father of php and explain the changes in php versions? Answer: Rasmus Lerdorf for version changes go to MarcoTabini is the founder and publisher of php|architect. 3. How can we submit from without a submit button? Answer: We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example: 4. How many ways we can retrieve the date in result set of mysql Using php? Answer: As individualobjects so single record or as a set or arrays. 5. What is the difference between mysql_fetch_object and mysql_fetch_array? Answer: MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array. 6. What is the difference between $message and $$message? Answer: They are both variables. But $message is a variable with afixed name. $$message is a variable who's name is stored in $message. For example, if $message contains "var", $$message is the same as $var.

7. How can we extract string ' ' from a string 'http://info@a...' using regular _expression of php? Answer: We can use the preg_match() function with "/.*@(.*)$/" as the regular expression pattern. For example:preg_match("/.*@(.*)$/","",$data); echo $data[1]; 8. How can we create a database using php and mysql? Answer: PHP: mysql_create_db() Mysql: create database; 9. What are the differences between require and include, include_once? Answer: File will not be included more than once. If we want to include a file once only and further calling of the file will be ignored then we have to use the PHP functioninclude_once(). This will prevent problems with function redefinitions, variable value reassignments, etc. 10. Can we use include ("abc.php") two times in a php page "makeit.php"? Answer: Yes we can include.. 11. What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ? Answer:Total 5 types of tables we can create 1. MyISAM 2. Heap 3. Merge 4. InnoDB 5. ISAM 6. BDB MyISAM is the default storage engine as of MySQL 3.23. 12. Functions in IMAP, POP3 AND LDAP? Answer: Please visit: 13. How can I execute a php script using command line? Answer:

Just run the PHP CLI (Command Line Interface) program and provide the PHP scriptfile name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program. Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment. 14. Suppose your ZEND engine supports the mode Then how can u configure your php ZEND engine to support mode ? Answer: If you change the...
tracking img