创建 Javascript Api 接口 [英] Creating a Javascript Api Interface
本文介绍了创建 Javascript Api 接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在研究 php 中查询 sql 数据库的解决方案.但是,我希望其他网站能够查询数据库(或 php 中的函数).我在谷歌上搜索,但由于跨域政策(我认为),我无法找到如何将这些函数公开给 javascript.
I'm currently working on a solution in php which queries an sql database. However, i want other website to be able to query the database (or the functions in php). I search google, but i can't find out how to expose these functions to javascript due to crossdomain policies(i think).
有人知道我该怎么做吗?
Anyone know how I can do that?
推荐答案
如果我理解正确...如果您希望其他站点访问您的数据库...显然……使用 jQuery :p 进行调用
If I understood right... if you want other sites to access your Database... Obviously...use jQuery :p to make the calls
这篇关于创建 Javascript Api 接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文