PHP Questions

Q:

What is the functionality of md5 function in PHP?

Answer

Calculate the md5 hash of a string. The hash is a 32-character hexadecimal number. I use it to generate keys which I use to identify users etc. If I add random no techniques to it the md5 generated now will be totally different for the same string I am using.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2113
Q:

What is a .htacces file

Answer

 .htaccess is a configuration file running on Apache server.These .htaccess file used to change the functionality and features of apache web  server .

 e.g   .htaccess file used for url rewrite .

         .htaccess file used to make the site password protected.

         .htaccess file can restrict  some ip addresses ,so that on restricted ip adresses  site will not open.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2101
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 2083
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 2072
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 2068
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 2059
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 2049
Q:

What are encryption functions in PHP?

Answer

CRYPT(), MD5()

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2020