我是 php 新手,我想使用 .php 文件作为 api,所以当我通过 fetch 或 axios 或任何其他方式从前端调用该 .php 文件时,它将以 json 格式返回数据.
有很多“假”api 来进行测试,这里是一个https://jsonplaceholder.typicode.com/
I think this solves your question, is to pass php data to front
I would change only the call to your path or php file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.