[英]How send request to .php file(backend) from front end via fetch() or axios, then get some response like json object
我是 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我认为这解决了你的问题,就是将 php 数据传递到前面
I would change only the call to your path or php file我只会更改对您的路径或 php 文件的调用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.