Skip to content
Advertisement

android avd connect to localhost php Lumen Port 8000

I have installed php-Server:

https://windows.php.net/download/

Then I built the Lumen based Webserver with this Link:

https://computerhalbwissen.de/wie-man-mit-dem-lumen-framework-eine-rest-api-erstellt/

I can now go to the following path:

cd C:phplumen-api

Then I typed in this line:

php -S localhost:8000 -t public

And I easily got my json-String with this line, when I typed it in
the browser address line:

http://localhost:8000/api/items/

I did a GET request in the browser of my android avd:

10.0.2.2:8000/api/items/

I get following screen:

Response Screen

What do I have to do to avoid this response. Do I have to
set something in the configurations of my avd?

Thank you for your help.

Advertisement

Answer

I cant access the php-Server with my Android-Device.
I installed xampp and everything works fine.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement