-
Junior Member
different between include and include_once
hi friends ,
Today i am join the this group ... my name is venkat i am join new php company . i have one doubt pls clarified this doubt
Different between include and include_once ......
-
Junior Member
Re: different between include and include_once
include_once in much secure than include. but both have the same results.....Thanks
-
Junior Member
Re: different between include and include_once
when ever a file find include funtion it trys to include the whole code of the included file in the execting file. so if you use same file include more than one, if the file contains function you will get function redeclre error at the second instance.
other wise, if you use include_once it will check whthere this file is already inclulded or not and if not then only in replaces the include file code.
-
Junior Member
Re: different between include and include_once
Yes. I am agreeing with venkat answer.
Because by using include function, we add the same files several times. It will store multiple files with a same name. And is reduce the performance.
If we use include_once function, the file will add only once. It avoid multi storages of a single file. Raises the performance for big applicatins.
Regards,
RK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules