answersLogoWhite

0

include will continue executing the script even with errors while require will produce a fatal error and stop the script.

Note: if you put include/require 'grandpa.php' in 'father.php' and then include 'father.php' in 'son.php' and also put include/require 'grandpa.php' in 'son.php' then both require & include will produce errors.

Best thing to add is include_once or require_once in your code as it will only add the file once and will override other include_once or require_once

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the difference between include and require in PHP?

The two functions are used to insert the content of a file into another PHP file before it is executed by the server. They are identical in every aspect, but they perform error handling in different ways. The include() function generates a warning (which does not halt execution) while the require() function generates a fatal error (which stops execution immediately).


What are the differences between require once and include once in PHP?

They're completely identical except how they output errors. Include produces a warning, while Require produces a fatal error.


What does the term include php refer to?

It is a term used in PHP programming language. The "include" statement means inclusion or evaluation of a specified file. It is similar to another PHP keyword - "require".


Difference between apache and PHP?

Apache is a web server. PHP is a scripting language.


How you can connect two webpage in php?

You can use: require('filename.extension'); Or: include('filename.extension');


What are the advantages and disadvantages of the PHP functions include and require and any functions that branch off of them?

something


Can .php files be executed when saved in other location than its web's root directory?

They can execute if you use include or require and show the full path of external php file in the www folder based php file.


How do you include a file in PHP?

To include a file in PHP all you need to do is use the include() function as I have shown you in the example below. <?php include("filename.php"); ?>


What is the difference between PHP and struts?

STRUTs is a framework of technology of java based on JSP/Java Servlets PHP is another server scripting language


What is the difference between net and php?

.net is a framework based on Microsoft software and is not open source, php is a language which is open source and based on Linux/unix systems


Difference between jsp and php?

JSP stands for Java Server Pages whereas PHP stands for Hypertext PreProcessor. PHP is a scripting language whereas JSP is a full fledged technology. JSP is much more powerful and has more features than PHP


What is the difference between the 1982 Large Digit and Small Digit pennies?

http://www.thecentproject.com/sort1982.php