PHP Questions

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 1939
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 1929
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 1924
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 1923
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 1909
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 1899
Q:

What are encryption functions in PHP?

Answer

CRYPT(), MD5()

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 1873
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 1863