PHP Questions

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

0 1674
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 - Technology

0 1673
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 - Technology

0 1662
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 - Technology

0 1661
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 - Technology

0 1657
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 - Technology

0 1642
Q:

What are encryption functions in PHP?

Answer

CRYPT(), MD5()

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

0 1639
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 - Technology

0 1596