Skip to content Skip to sidebar Skip to footer

Php File In Server Not Executed From Android Client

I'm returning to you another time because i'm simply blocked. I want to execute a php file stored in server, for that, i used that code: @Override protected Void doInBackgr

Solution 1:

Your code looks ok. But you are executing your GET request twice for no real reason (also there's not "executing PHP script" - you are doing just GET request. What action it would trigger on server is another story).

Replace this code:

client.execute(newHttpGet(url));
Log.d("EXECUTED",client.execute(newHttpGet(url)).toString());

with:

HttpResponseresponse= client.execute(newHttpGet(url));
Log.d("EXECUTED: " + response );

Solution 2:

When accessing a URL, a client does normally not need to care the technology that is used behind. This Android app is a client like any other, therefore it does not need to "activate" the PHP script it tries to connect to. The behaviour of this script is up to the server application.

Post a Comment for "Php File In Server Not Executed From Android Client"