Why php files are not working on a php web hosting but it is working on XAMPP?

Keywords´╝Ü php web-hosting

Question: 

I cannot figure out why for a long time. I think there must be something I am missing and I made it wrong.

This is my files. https://github.com/chankwongyin/DCFeverWebScraper

I tried push it to two different web hosting, it still doesn't work.

I expect after entering the search query, there should be some results. E.g. In XAMPP, by entering "iphone 6", there will be many results generated and show on the screen. However, there is no result when i put the files on web hostings.

Answers: