Failide lisamine PHP-s
Oletame, et meil on üks fail:
<?php
echo 'index';
?>
Oletame, et on ka teine fail:
<?php
echo 'test';
?>
Paneme teise faili sisu esimesse faili.
See tehakse operaatori include abil:
<?php
include 'test.php';
echo 'index';
?>
Sama faili saab lisada mitu korda:
<?php
include 'test.php';
include 'test.php';
include 'test.php';
echo 'index';
?>
Tehke failid file1.php, file2.php,
file3.php. Ühendage need oma põhifailiga.