我已安装php-Server:
https://windows.php.net/download/
然后我使用此链接构建了基于Lumen的Web服务器:
https://computerhalbwissen.de/wie-man-mit-dem-lumen-framework-eine-rest-api-erstellt/
我现在可以转到以下路径:
cd C:\ php \ lumen-api
然后我在此行输入:
php -S localhost:8000 -t public
当我在其中键入时,我很容易在此行中得到我的json-String浏览器地址行:
http://localhost:8000/api/items/
我在android avd的浏览器中进行了GET请求:
10.0.2.2:8000/api/items /
我得到以下屏幕:
为了避免这种反应,我该怎么办。我一定要吗在我的avd的配置中设置某些内容?
谢谢您的帮助。
我无法使用Android设备访问php-Server。我安装了xampp,一切正常。