请问下laravel与andriod的app通信是可直接用$_post、$_get接收,然后echo json_decode(xxx);返回信息吗 这个放的位置可以任意放置吗
就写个接口嘛,找个文件夹放着就可以了
接收参数就是使用$_GET,$_POST来获取
返回数据是用 echo json_encode(xxxx); 而不是 echo json_decode(xxxx);
返回时需要加上header,
header('content-type:application/json');
接收参数就是使用$_GET,$_POST来获取
返回数据是用 echo json_encode(xxxx); 而不是 echo json_decode(xxxx);
返回时需要加上header,
header('content-type:application/json');
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号