Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

Explain include(), include_once, require() and require_once.

The include() function takes all the content in a specified file and includes it in the current file. If an error occurs, the include() function generates a warning, but the script will continue execution.
File will not be included more than once. If we want to include a file once only and further calling of the file will be ignored then we have to use the PHP function include_once().
The require() function is identical to include(), except that it handles errors differently. The require() generates a fatal error, and the script will stop.
The required file is called only once when a page is open and further calling of the file will be ignored.

asked Sep 13, 2013 in PHP by rajesh
edited Sep 12, 2013
0 votes

Related Hot Questions

Government Jobs Opening