Autoloading classes within module
Posted: Wed Apr 06, 2011 6:10 pm
Hi guys, how can I make autoloading classes in my new module? I was typing
in my main module folder a have Somethink.php file with this content:
And in my main module class in action.defaultadmin.php somewhere I have:
And, when I fire up my code is doing nothink, no errors, no exceptions... nothink... What I doing wrong?
in my main module folder a have Somethink.php file with this content:
Code: Select all
<?php
class Somethinkg {
public function __construct() {
echo "Somethink";
}
}
Code: Select all
<?php
function __autoload($classname) {
require_once $classname . '.php';
}
$var = new Something();