3-6-2008 16:29:57
window.php
<?php
class window
{
function tohtml()
{
return "do nothing";
}
}
?>
theleft.php
<?php
class theleft extends window
{
function tohtml()
{
return "the left";
}
}
?>
theright.php
<?php
class theright extends window
{
function tohtml()
{
return "the right";
}
}
?>
index.php
<?php
function __autoload($class_name) {
require_once $class_name . '.php';
}
$ref = new ReflectionClass("theright");
$a = $ref->newInstance();
echo $a->tohtml();
?>