Can we use include(page.php) two times in a php page.Any possibilities for errors
Eg:
include(page.php);
-------
--------
--------
--------
include(page.php);
Can we use include(page.php) two times in a php page.Any possibilities for errors
Eg:
include(page.php);
-------
--------
--------
--------
include(page.php);
But it can have some adverse effects on your code.
Consider this...
test1.php
<?php
$var=1;
test2.php
<?php
include('test1.php');
echo $var; // "prints" 1
$var = 30;
include('test1.php');
echo $var; // "prints" 1 again.
To overcome this situation , you should make use of include_once()
construct.