Let\'s say I\'ve got two files class.php and page.php
class.php
You can use include/include_once or require/require_once
require_once('class.php');
Alternatively, use autoloading
by adding to page.php
data);
?>
It also works adding that __autoload
function in a lib that you include on every file like utils.php
.
There is also this post that has a nice and different approach.
Efficient PHP auto-loading and naming strategies