-1

I have website developed using Phalcon Framework. Now I need to develop REST API for that website. So I used Phalcon API tutorials, Those are work perfect in local server and another server. But it not works with current website. When I use that I'm getting "ApiController handler class cannot be loaded" also canot over write current index.php with "Micro" because that loading website content So, How i do develop that api using same phalcon in same server?

ex : current URL: http://www.sample.com need api url : http://api.sample.com/sat/newuser

  • When I Google `phalcon build rest api` I get plenty of great results. Please always Google first before asking. Thanks! – Pekka Feb 11 '16 at 11:39
  • I googled that but i didnt get any answer related that. I think you misunderstand my problem. – Shanka Nuwan Feb 11 '16 at 12:01
  • So a tutorial like [this one](https://docs.phalconphp.com/en/latest/reference/tutorial-rest.html) doesn't answer your question? Then you should clarify where exactly you are stuck – Pekka Feb 11 '16 at 12:03
  • Yep, I done that in my local server and another server, Those are work perfect. But it not works with current website. When I use I'm getting "ApiController handler class cannot be loaded" also canot over write current index.php with "Micro" because that loading website content. – Shanka Nuwan Feb 11 '16 at 12:11
  • Ah, I see. That's the kind of information that should be in the question from the start - if possible with even more detail. Can you edit it in? – Pekka Feb 11 '16 at 12:33

1 Answers1

1

I could fixed that problem using sub-domain. i pointed http://api.sample.com sub-domain to new directory called "api".