my class naming convention: class.ClassName.php
my class file naming convention: class.classname.php (hence the strtolower).
the class files are located in the include path: /home/content/XX/XXXXXX/html/projects/include/
//autoload.php
<?php
class Autoload {
public static function autoloadClasses($className) {
$className = strtolower($className);
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include/class.' . $className. '.php';
require_once($file);
}
}
$register = spl_autoload_register('Autoload::autoloadClasses');
?>
//check4.php
<?php
$company = $s->company;
$projectName = 'development';
$items = array('type', 'scope', 'table', 'conditions');
$things = array('select', '*', 'todos', array('company'=>$company, PROJECT_NAME=>$projectName));
$combinedArray = array_combine($items, $things);
$q = new Query($combinedArray);
?>
verified classes exist and are included http://technicheian.com/images/includedClasses.png
on every page that makes use of a class (e.g. this one calling Query; located class.query.php:
05-Nov-2011 20:18:30]PHP Fatal error: Class 'Query' not found in /home/content/XX/XXXXXX/html/projects/check4.php
on line 9
at the end of class.session.php is $s = new Session
(noted here to say that the $company variable should not be empty).
I've read pretty much every article, how-to, etc. I can find. What am I missing?
running php 5.2