My local server can find the controller class, but once live I get the following error:
Fatal error: call to undefined method getMyLogs();
To access the method I do the following:
$activity = new PointsController();
$logs = $activity->getMyLogs($_SESSION['id']);
Now the method itself:
public function getMyLogs($id)
{
$db = new DB();
$sql = 'SELECT * FROM `users_activity` WHERE `user_id` = :user_id ORDER BY `log_date` DESC';
$results = $db->get($sql, array(
':user_id' => $id
));
return $results;
}
As said, it is working like a charm on my localhost. Once I upload it live the server respond with the error I mentioned.
How is this possible? What am I doing wrong?