Thursday, October 1, 2009

INTERVIEW QUESTIONS

PAPER 1:

oops total:
inheritance
polymorphism
encapsulation
abstraction
data binding


2 what is subquery

3 how we send email using js

4 joomla (extra advantage)

5. what is model view controller

6. who is handle the business logic in cake php

7 validation in cake php

8 associations and parameters passed in asso

9. where we put the third party js in cake php

10 how we find the 2nd highest salary

11 joins right join or left join

12 write the 5 inbuilt functions of php

13 make the two dynamic functions for send an email and connection to mysql

14 example of inheritance

15 how u start a cake project
(i) talk to client like this...

16 component in cake php y we use this and how we use components in cake php

17 what is helpers in cake php

18 what is session

19 how we destroy a session in cake php and a single var

20 what is cookie

21 why we use session

22 thumbnails in cake php

PAPER 2:

Qus1:What is difference between require_once(), require(), include(). Becouse above three function usely use to call a file in another file.
ans:Difference between require() and require_once(): require() includes and evaluates a specific file, while require_once() does that only if it has not been included before (on the same page).
So, require_once() is recommended to use when you want to include a file where you have a lot of functions for example. This way you make sure you don't include the file more times and you will not get the "function re-declared" error.

Difference between require() and include() is that require() produces a FATAL ERROR if the file you want to include is not found, while include() only produces a WARNING.

There is also include_once() which is the same as include(), but the difference between them is the same as the difference between require() and require_once().

Ques2:How to prevent form hijacking in PHP?
ans:Following things can be done for preventing your PHP Form from Hijacking

1. Make register_globals to off to prevent Form Injection with malicious data.
2. Make Error_reporting to E_ALL so that all variables will be intialized before using them.
3. Make practice of using htmlentities(), strip_tags(), utf8_decode() and addslashes() for filtering malicious data in php
4. Make practice of using mysql_escape_string() in mysql.

ans:Following are new features added in PHP5

1. PHP 5 introduces the Standard PHP Library (SPL), which provides a number of ready-made classes and interfaces.
2. Access Modifiers are added in PHP5
3. PHP5 has built-in exception classes that makes it very easy to create your own customized exceptions through inheritance.
4. PHP 5 introduces the mysqli (MySQL Improved) extension with support for the features of MySQL databases versions 4.1 and higher. So use of prepare statements are allowed
5. PHP5 comes with PDO which is a common interface for different database systems is only made possible by the new object model.
6. SQLite is a database engine incorporated in php5 which can be used to develope faster, leaner and more versatile applications.
7. In PHP 5 all Extensible Markup Language (XML) support is provided by the libxml2 XML toolkit.
8. The reflection classes included in PHP 5 provide ways to introspect objects and reverse engineer code.
9. In addition to built-in classes, PHP 5 also offers built-in interfaces. Iterator is the most important, as a number of classes and interfaces are derived from this interface.
10. PHP 5 introduces a number of new "magic" methods. Magic methods begin with a double underscore, and this requires changing any user-defined methods or functions that use this naming convention.
11. The major change to PHP in version 5 relating to OOP is usually summed up by saying that objects are now passed by reference.

ans:get_browser() attempts to determine the capabilities of the user's browser. This is done by looking up the browser's information in the browscap.ini file.

echo $_SERVER['HTTP_USER_AGENT'] . "
";

$browser = get_browser();

foreach ($browser as $name => $value) {
echo "$name $value
";
}

//netsolutions questions...

12. questions: sql: how u can get the nth record ?


13. how to have 3rd largest sal.?

14. how to change content of 2nd sel box depending on 1st sel box in js

or jquery?
ans. i d k

ajax lagani padegi, meine yahi batya tha


15.how to change content of 2nd sel box depending on 1st sel box in js

16.sql joins left join ka example

17. php session and cookies

18. php array sorting

19. js split function

20. cake php struct

21. cakephp request handling

22. session in cake

23. sql indexes????


No comments:

Post a Comment