Just learn php two days, Mister want me to write a server and Android interaction, the function does not need to be very powerful, output a Hello world can, no ideas ah, ask the great gods!
Reply to discussion (solution)
Just the echo output.
is a server-side program
Write a PHP page on the 2 floor and then visit any browser on Android to see it!
The PHP side of the direct echo output is available, Android access to that page can be obtained.
If you want to more complex point data, json_encode after echo,android obtained and then solved it can be used, if the data utf8
The title is so tall, the answer is so simple ...
Frankly speaking, PHP server is to do logic and data processing, and then in a fixed format output, Android use the HTTP protocol or other protocols such as soap to obtain the corresponding data.
PHP writes a server with a ready-made framework
See http://www.workerman.net/
Many features are supported.
The startup interface is as follows:
Socket
If the interaction, the server is finally exported in JSON format.
' Hello wolrd '); Echo Json_encode ($ret);? >
{"Result": "Hello wolrd"} I can refer to a framework I have developed here: http://my.oschina.net/u/256338/blog/285184
[Web Services Lightweight Development Framework]ZENPHPWS3: Documentation & Samples & design & source code
is for the PHP server and Android