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