Get OOP Function on php5 file accessed by ajax jquery function

Hi everyone.

I have some code like this:

config.php


<?php

// Includes
require_once 'classes.php';

// Database Connection
$UserFunctions = new User(); 
$Con = $UserFunctions->DatabaseConnection();

?>


classes.php


public function hello() {

...code

}


Jquery file


$(document).ready(function() {

    $("#MyDiv").click(function() {        

        $.ajax({         
            async: false,
            url:        'file.php',
            type:       'POST',
            dataType:   'json',
            data: {
            
            },

            success:function(data) {

                $("#someDiv").prepend(data);
        
            }
  
        });
    });
});

php5loaded by ajax jquery file


 now on this file i am trying to call my function hello on the classes place, i know that i have the right code to access the classes file but cant call the function, need some help to call the function to this file, maybe it is because i am using jquery with ajax to load the page, how can i do it? thanks people.