Require():
Require() method use for including multiple files,its takes all content of file and copies it in the specified.syntax for require() method as below:
<?php
require 'file_name.php';
?>
file_name.php means path of file
Require_once():
Require_once is similar as require() method ,only different is that if the code from a file has already been included, it will not be included againsyntax for require_once method as below:
<?php
require_once 'file_name.php';
?>
No comments:
Post a Comment