Error in include_once using AJAX

0

The code is in the link because is in a folder system.

PROBLEM:

I have an MVC architecture. Inside the view I have a class that contains a registration form that is in the initial_shield class. The form field data are sent to a script that contains an ajax this ajax will send the information to the class control and then there will be a return to the script by the function (done).

The error is happening in the User_dao class, every time I try to include the connection class present in the singleton package I get an error which is issued by the done function of ajax.

In the code I commented the inclusion but you can withdraw the comment of the include_once of the User_date class and enter the data, which will see the error. This is the image of the error when I include the connection class:

FILE LINK

    
asked by anonymous 10.01.2018 / 17:21

1 answer

0

Thiago I downloaded your system and debugged, I put the class Connection.php inside where is User_of.php, and I made the following include:

include 'Conexao.php';

Soon after this the test alert worked normally. or the code was ok

But for you to solve your error, you have the classic URL error, put the absolute url, (I did it on your system and it worked)

include($_SERVER['DOCUMENT_ROOT']."/APP/MODEL/SINGLETON/Conexao.php");
    
10.01.2018 / 17:41