将Firebase与PHP脚本一起使用 [英] Using Firebase with a PHP script

查看:55
本文介绍了将Firebase与PHP脚本一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是从零开始编写我的Web服务(PHP + MySQL).Firebase的明显易用性和开发速度吸引了我的注意.在开始将其集成到我的应用程序之前,我已经编写了一些PHP脚本来查询公共API并将结果返回给我的应用程序.我认为如果可以使用Firebase通过将它们添加到NoSQL DB来缓存这些结果,那将是很酷的事情,但是我对如何做到这一点尚不完全清楚.我可以将脚本托管在Firebase中吗?如果没有的话,我想我只是从Github那里获得了一个开源SDK,但是似乎在服务之外托管脚本并不是理想的工作流程.也许有一种方法可以调用外部API并使用Firebase本身解析结果?

I've always written my web services from scratch (PHP + MySQL). Firebase has caught my attention for its apparent ease of use and speed of development. Before I started integrating it into my app, I had already written some PHP scripts which query a public API and return the results to my app. I'm thinking it would be cool if I could use Firebase to cache these results by adding them to the NoSQL DB, but I'm not totally clear on how I would do this. Can I host my scripts somewhere in Firebase? If not, I guess I just grab one of the open source SDKs off Github, but it seems like hosting scripts outside of the service isn't the ideal workflow. Maybe there is a way to call an external API and parse the results with Firebase itself?

推荐答案

从Firebase网站

From Firebase website

我们通过安全的SSL连接交付您所有的静态内容(html,js,图像等),并将其提供给CDN.

We deliver all of your static content (html, js, images, etc.) over a secure SSL connection and serve it on a CDN.

Firebase托管用于托管静态资产

Firebase Hosting is for hosting static assets

在此处回答

这篇关于将Firebase与PHP脚本一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆