我有示例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
答案 0 :(得分:1)
您可以看到相关问题here。
在GAE中,当声明某个静态路径时,会将其解释为非代码路径。因此,在PHP环境中运行带有require或include的脚本无法访问该路径中的所有文件。
尝试将所有静态文件放在www.
子文件夹下,而将非静态文件放在另一个子文件夹下。只是尝试将它们分开。