When displaying the income graphs by year, it shows me an error. I am using ChartJs

Website URL

(https://cajachicaonline.kesug.com/php/c_grafico_ingresos.php I have an error when I want to show the graphs by years with the chartjs library)

Error Message

(On localhost it works fine but when I upload the project to the server I get this error Access to XMLHttpRequest at from origin ‘https://cajachicaonline.kesug.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.


)

Other Information

(I updated the chartjs library and I still get that error)

1 Like

Read

6 Likes

Your PHP code tries to POST to this address

but that address does not exist
because you named folder “Controller” with a capital letter on the server.

The server is case-sensitive and it is not the same uppercase and lowercase.

Edit your PHP so that it POSTs to this location

/Controller/” instead of “/controller/

or rename the folder “Controller” to lowercase via FTP

7 Likes

tranks solved

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.