Use own server with phonegap

0

Good! I'm trying to test my application on phonegap. My application consists of a "Public" directory with the front-end, and a "Server" folder with the server. If I copy all the contents of the "Public" directory in the www directory of a phonegap project, I can see the content on the mobile but can not access my own server or my database.

I know very little about servers and I can not think of how to do it.

Thank you!

    
asked by Pablo 23.12.2017 в 16:31
source

1 answer

2

Sometime ago something similar happened to me, I had my little app, which used html, php and mysql, running on a xamp on my computer, and I thought that with phonegap I could copy from my xamp to phonegap and work.

The fact is that in phonegap you can not run php files because you do not have a php compiler / processor or whatever you want to call it, so it's not as simple as I thought.

The case is that in the application that you run in phonegap, you have to make calls to an api that you can create in a server xamp or similar, this api, executes the php files, makes the corresponding queries to the database , and returns the data in json format.

Greetings

    
answered by 23.12.2017 / 20:07
source