डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

Full Stack Web Development with Laravel

Full Stack Web Development with Laravel

Affiliate Program

Affiliate Program

PHP include require function

Using one file code in another file is very important, sometimes in a project we need to use the same menubar in multiple files one way is to write menubar code in every file and become very tedious to manage the project, for example, we want to add or remove one link in a menubar so we have to visit every file which contains that menubar and we will change file, so there we need of include and require function.

PHP include()

This include() function copy one file of code into another file.
Note: when the include() function has the wrong file path, the rest of the code does not affect by this.

include_once()

Include file once

PHP require()

This require() function copy one file of code into another file same as to include()
Note: when the require() function has the wrong file path, the reset of code does affect by it.

© 2016 - 2023, All Rights are Reserved.