【问题标题】:Problem with app.yaml file setting for appspot应用程序的 app.yaml 文件设置问题
【发布时间】:2020-03-18 11:35:55
【问题描述】:

我有示例 app.yaml,但在完成部署后尝试查看链接时出现此错误:

This xxxxxxx.appspot.com page can’t be found
No webpage was found for the web address: 
http://xxxxx.appspot.com/index.php


APP.YAML 设置:

runtime: php55
api_version: 1

handlers:
# Serve images as static resources.
- url: /(.+\.(gif|png|jpg))$
  static_files: 
  upload: .+\.(gif|png|jpg)$
  application_readable: true

# Serve php scripts.
- url: /(.+\.php)$
  script: index.php


目录中的文件是:

app.yaml
index.php
post.php
pic.PNG

【问题讨论】:

    标签: php google-app-engine yaml


    【解决方案1】:

    您可以查看相关问题here

    在 GAE 中,当声明某个路径为静态时,它会被解释为非代码路径。因此,在 PHP 环境中使用 require 或 include 运行的脚本无法访问该路径中的所有文件。

    尝试将所有静态文件放在www. 子文件夹下,将非静态文件放在另一个子文件夹中。试着把它们分开。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-16
      • 1970-01-01
      • 2011-09-14
      • 1970-01-01
      • 2019-10-19
      • 2011-06-28
      • 2017-09-04
      • 2017-08-08
      相关资源
      最近更新 更多