appspot的app.yaml文件设置问题



我有示例 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

您可以在此处查看相关问题。

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

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

最新更新