I have directory called "api" and in that I want to run a php script called "tweet.php". This script file is calling inside a JS file. However I am getting a 404. Need help to solve the issue.

Link to the project directory http://yrolonline.com/mak_nutrition/


  • 2
    to "need help" is not a question. please edit the question and suply all the details of what exactly you are trying to do, add relevant code snippets, and what are the expected results and what actually happens. – Mark Kaplun Nov 30 '15 at 11:35

I think this is not good idea - create many enter points. Open Web Inspector and check your URL which using in JS code.

But much better use the default admin_url( 'admin-ajax.php' ) to creates path which should be used in Java Script.

  • Got it working. Thanks +1. Glad you answered the question – Yrol Dec 1 '15 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.