PHP Include & Require

NEXT>>
PHP include & require - August 21, 2008 at 22:00 pm by Rajmeet Ghai

What is the difference between include and require?
Explain the differences between require and include, include_once?

What is the difference between include and require?

Answer
Require() and include() are the same with respect to handling failures. However, require() results in a fatal error and does not allow the processing of the page. i.e. include will allow the script to continue.   

Explain the differences between require and include, include_once?

Answer
Include() will include the file specified.

Include_once() will include the file only once even if the code of the file has been included before.

Require() and include() are the same with respect to handling failures. However, require() results in a fatal error and does not allow the processing of the page.

PHP include and require - October 01, 2009 at 17:00 pm by Vidya Sagar

What is the difference between include and require in PHP?

The include() and require() are almost similar except the way they handle failures. include() produces a warning and require() produces a fatal error. To halt processing of the page, use require(). The same operation will not halt by using include(). It should be ensured that the include_path settings are proper. Both are used for inserting the file content into PHP file prior to its execution by the server.

NEXT>>

Write your comment - Share Knowledge and Experience


Related PHP links 

What is urlencode and urldecode?

Answer - Urlencode can be used to encode a string that can be used in a url.............

What are the different types of errors in PHP?

Answer - Different types of errors are............

Explain how to submit form without a submit button.

Answer - A form data can be posted or submitted without the button in the following ways:............

What are the functions for IMAP?

Answer - IMAP is used for communicate with mail servers. It has a number of functions.............

 
Latest placement tests
Latest links
 
 
Home | Want a Job? Submit Key Skills | Employer login | My key skills | About us | Sitemap | Contact us