PHP Questions

Q:

What is difference between MyISAM and InnoDB storage engines in mysql.

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.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1752
Q:

Why many companies are switching their current business language to PHP? Where PHP basically used?

Answer

PHP is rapidly gaining the popularity and many companies are switching their current language for this language. PHP is a server side scripting language. PHP executes the instructions on the server itself. Server is a computer where the web site is located. PHP is used to create dynamic pages and provides faster execution of the instructions.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1745
Q:

How many types of Inheritances used in php and how we achieve it?

Answer

As far PHP concern it only support single Inheritance in scripting. we can also use interface to achieve multiple inheritance.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1745
Q:

What is the difference between the functions unlink and unset?

Answer

unlink()-deletes the given file from the file system.
unset() -makes a variable undefined.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1745
Q:

How to store the uploaded file to the final location?

Answer

move_uploaded_file( string filename, string destination)

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1737
Q:

What is the use of header() function in php?

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..

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1734
Q:

What are encryption functions in PHP?

Answer

CRYPT(), MD5()

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1719
Q:

How can we know the number of days between two given dates using php?

Answer

<?php
$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
echo ($tomorrow-$lastmonth)/86400;
?>

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1675