Automatically Loading Include Files With ___Autoload()

<?php
function ___autoload ($class) {
  $file = "$class.inc.php";
  include_once( $file );
}
$test = new YourClassName();
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.