Skip to Content

You are here

prathK's blog

Difference Between Include() Vs Include_once() In Php

The include_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included, it will not be included again. As the name suggests, it will be included just once.
 
 

ok, what does this mean exactly? lets say for example, i have three files, 

 

FILES: 

FUNCTIONS.PHP 

GLOBALS.PHP 

HEADER.PHP 

this is how each file looks like:

Tags: 

Pages

Subscribe to RSS - prathK's blog