Skip to main content

Openings for different technoogies.

PHP Interview questions 3

6) how to track no of user logged in ?
Ans :      whenever a user logs in track the IP, userID etc..and store it in a DB with a active flag while log out or sesion expire make it inactive. At any time by counting the no: of active records we can get the no: of visitors.

7) in PHP for pdf which library used?
Ans :      The PDF functions in PHP can create PDF files using the PDFlib library With version 6, PDFlib offers an object-oriented API for PHP 5 in addition to the function-oriented API for PHP 4. There is also the » Panda module. FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. FPDF requires no extension (except zlib to activate compression and GD for GIF support) and works with PHP4 and PHP5.

8) for image work which library?
Ans :      we will need to compile PHP with the GD library of image functions for this to work. GD and PHP may also require other libraries, depending on which image formats you want to work with.
                 
9) what is design pattern? singleton pattern?
Ans :      A design pattern is a general reusable solution to a commonly occurring problem in software design.
The Singleton design pattern allows many parts of a program to share a single resource without having to work out the details of the sharing themselves.

10) what are magic methods?
Ans :      Magic methods are the members functions that is available to all the instance of class Magic methods always starts with "__". Eg. __construct All magic methods needs to be declared as public To use magic method they should be defined within the class or program scope Various Magic Methods used in PHP 5 are: __construct() __destruct() __set() __get() __call() __toString() __sleep() __wakeup() __isset() __unset() __autoload() __clone()

Comments

Popular posts from this blog

Openings for different technoogies.

 

What is the purpose of using the TIMESTAMP data type?

  A TIMESTAMP data type is used to store the combination of date and time value which is 19 characters long. The format of TIMESTAMP is YYYY-MM-DD HH:MM: SS. It can store data from ‘1970-01-01 00:00:01’ UTC to ‘2038-01-19 03:14:07’ UTC. By default, the current date and time of the server get inserted in the field of this data type when a new record is inserted or updated.

PHP History And Information

With an increasing community; PHP is considered today as one of the most famous scripting languages. It is widely used today as a general purpose scripting language, particularly useful for web developments and like other scripting languages; it can also be embedded directly into the HTML code. Within a short span of time, PHP has gained remarkable popularity and its community is increasing rapidly. There are various reasons for that, for instance: My security bunny found a more fortified position PHP, as you may know, is a free software and anyone can download it; use it and it supports various operating systems The syntax of PHP is quite similar to C which makes it more appealing for computer programmers. Whatever you have done with Perl in the past, you can do it with PHP. PHP is web specific and is more powerful than Perl. PHP works equally well and can be deployed on many web servers like Apache, IIS etc PHP scripts can be used for various standard network pro...