Explain about require and include function?



Explain about require and include function?..

Answer / Deepak Modiyani

In PHP, `require` and `include` are functions used to include a file into another file. The main difference between them is that if an error occurs while executing a file included with the `include` statement, the script continues execution (though it may not work correctly due to the error), while if an error occurs with the `require` function, the script stops and displays an error message.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How to remove leading and trailing spaces from user input values in php?

1 Answers  


how we can upload and view video files

2 Answers  


What is php how it works?

1 Answers  


What is difference between get and post in php?

1 Answers  


What are the special characters you need to escape in single-quoted stings?

1 Answers  


What is the difference between InnoDb tables and MyIsam Tables in php

1 Answers  


what is PHP accelerator ?

2 Answers  


If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?

1 Answers  


What is framework in php?

1 Answers  


How to stop the execution of php script?

1 Answers  


How to check curl is enabled or not in PHP

1 Answers  


What exactly is PHP?

1 Answers  


Categories