Jump to content

[SOLVED] PHP OOP Error, Undefined Class


DarkSuperHero

Recommended Posts

I have 2 classes and 1 interface set up, very simple setup, almost works fine running locally under Zend Studio, but when I upload it to the server I get The following Message....

 

Fatal error: Undefined class name 'databaseresponsibility' in /homepages/path/to/htdocs/experiments/sort.php on line 7

 

I have double and tripple check myfiles, and all of them have the correct case spelling....

 

<?php
include 'function/autoload.php';
$file = '1.csv';
$myarray = file($file);
$newArray = array();

$sql = DatabaseResponsibility::getInstance();  //this is line 7, uppercase first letter of everyword.. error indicates lowercases..
$myresults1 = $sql->getResultsArray('SELECT vendorId, vendorShortName FROM vendortable');
$myresults2 = $sql->getResultsArray('SELECT categoryId,categoryName FROM categorytable LIMIT 0 , 30');
print_r($myresults1);

 

my classes are defines like this...

class DatabaseResponsibility extends mysqli implements IDatabaseResponsibility {
//body
}

 

i am a bit stumped on this one... :-\

Link to comment
https://forums.phpfreaks.com/topic/154224-solved-php-oop-error-undefined-class/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.