php - Firebase .htaccess 到 json
问题描述
我搜索并发现 .htaccess 仅在 firebase 中不起作用 firebase.json 我想让 firebase.json 在 .htaccess 中像这样将 .html 文件读取到 php
[Apache2 @ Ubuntu/Debian: use this directive]
AddType application/x-httpd-php .html .htm
Or, from comment below:
AddType application/x-httpd-php5 .html .htm
If your are running PHP as CGI (probably not the case), you should write instead:
AddHandler application/x-httpd-php .html .htm
解决方案
Firebase 托管不支持评估 PHP 代码。事实上,它并不直接支持任何后端代码执行。
您通过 Firebase 托管运行后端代码的选项仅限于与 Cloud Functions 和 Cloud Run的集成。如果您必须运行 PHP,那么 Cloud Run 是您唯一的选择,要完全配置和运行该解决方案将是一项相当大的工作量。
推荐阅读
- amazon-web-services - 在 Web 应用程序中显示 AWS API Gateway Cloudwatch 日志(无需登录 AWS 控制台)
- python - 如何检查一个运动图像是否被触摸到另一个运动图像
- python - 如何在 mongodb 中查找包含 NaN 值的字段的 $avg 和 $sum?
- javascript - NPM 中的 --openssl-legacy-provider 是什么?
- java - 为什么这个异常在我的服务器上运行 Spring Boot\Batch 应用程序?java.lang.OutOfMemoryError:无法创建本机线程:
- swift - Swift Async 让带循环
- python - 如何实时读取过程输出
- postgresql - 错误:“DELIMITER”第 1 行或附近的语法错误:DELIMITER //
- php - 为什么我会在 Docker 容器之间遇到 CORS 问题
- vhdl - Vivado - VHDL 问题:ieee.fixed_pkg.all