What is the difference between include() and require() in php

By | 07/05/2012

include() and require() function does the cell phone spy canada same process of calling a php or html or js file.

When the included file (i.e., calling a file) is missing in its actual directory, then require() function will returns FATAL ERROR and include() function will return WARNING.

Read: what is the use of include() and require() in php

include_once() function will include a file only when that http://pinnaclefitnessclub.com/track-a-cell-phone-online-5rr file is not http://lasayadeco.com/jx-call-blocker-for-nokia-5130-free-download.html included before. This function http://vodka.riverfronttimes.com/pc-spy-camera-software-dr is the recommended for including files, because including a http://pinnaclefitnessclub.com/cpr-call-blocker-v201-yztd file more than once will arise ERROR

require_once() function performs the same operation performed by include_once() function. The only difference between include_once() function and require_once() function is as like the difference between include() and require() that is include_once() function returns WARNING and require_once() function returns FATAL ERROR, when file is missing.


Example for include() function and require() function

Select Code
<p>echo "Require and include function";</p>
<p>?></p> <a style="text-decoration: none; color: inherit; cursor: default; outline: none;" href="http://websiteviewing.com/spy-windows-7-phone-0r6">spy windows 7 phone</a> 

Post By prasad (110 Posts)

Website: →


About prasad

Prasad K has written 110 post in this blog.

Category: php

Leave a Reply