且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

连接到MySQL数据库使用PHP从Android设备

更新时间:2022-11-29 23:03:12

要回答你的问题:

1)PHP文件不包括在Android设备上。
2)你需要创建一个PHP文件,并将其上传到服务器。

1) The php file is not included on the Android device.
2) You need to create the .php file and upload it to a server.

现在,我不知道你知道多少关于PHP,但以防万一你是一个初学者,你可以轻松地创建的.php使用文本编辑器应用程序文件,如文本编辑(Mac)或记事本(Windows)中。你控制的服务器或有一个网站的某个地方?如果是的话,你可以将文件上传到某个位置出现。

Now, I'm not sure how much you know about php, but just in case you are a beginner, you can easily create .php files using a text editor application such as Text Edit (Mac) or Notepad (Windows). Do you control a server or have a website somewhere? If so, you can upload the file to a location there.

如何在PHP文件将工作: 首先,你的Andr​​oid设备(一旦你完成该教程,你引)会发送一个请求到服务器上的PHP文件,PHP文件将连接到MySQL数据库,并产生一些输出,你的Andr​​oid应用程序可以拿回( 恩,知道MySQL连接尝试的结果,等等的)

How the php file will work: First, your android device (once your finish that tutorial you cited) will send a request to the php file on your server, and the php file will then connect to the MySQL database, and generate some output which your Android app can get back (ex. to know the result of the MySQL connection attempt, etc)

* 进一步说 如果您想对PHP的一个超级简单的教程检查出W3学校优秀的PHP部分: HTTP://www.w3schools。 COM / PHP /

*Going Further If you want a super-easy tutorial on php check out W3 Schools excellent php section: http://www.w3schools.com/php/