Send Xmlhttprequest() to a class method

Asked

Viewed 30 times

0

Got some way of doing request.open('post', 'server.php'); call a direct php class method instead of calling a file?

  • You use some framework or pure PHP only?

  • You need a front controller to receive requests and map one of the parameters to the appropriate class and method. Or use a microframework such as Silex to do it for you.

  • Thanks, I’ll check both options.

  • Good morning, Matheus! Yes, there is, I created an example for you to check out. Just follow the link below the Github: https://github.com/williamurbano/examples/tree/master/request-class-method

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.