让我的app.yaml PHP配置在Google app Engine中工作
我对谷歌应用程序引擎(GoogleAppEngine)是个新手,App.yaml严重困扰了我,我想不出来,我到处都找过,但似乎什么都没用。这是我的.yaml,所有东西都可以在XAMPP上运行,但我似乎无法让它在应用程序引擎上运行让我的app.yaml PHP配置在Google app Engine中工作,php,google-app-engine,include,app.yaml,Php,Google App Engine,Include,App.yaml,我对谷歌应用程序引擎(GoogleAppEngine)是个新手,App.yaml严重困扰了我,我想不出来,我到处都找过,但似乎什么都没用。这是我的.yaml,所有东西都可以在XAMPP上运行,但我似乎无法让它在应用程序引擎上运行 runtime: php55 api_version: 1 handlers: - url: /(.*\.(ico$|jpg$|png$|gif$|htm$|html$|css$|js$|xml$)) static_files: \1 upload: (.
runtime: php55
api_version: 1
handlers:
- url: /(.*\.(ico$|jpg$|png$|gif$|htm$|html$|css$|js$|xml$))
static_files: \1
upload: (.*\.(ico$|jpg$|png$|gif$|htm$|html$|css$|js$|xml$))
application_readable: true
- url: /(.+)
script: \1
- url: /
script: index.php
“我的索引”中的包含项,例如
,不会显示在我的页面上,并且该文件也包含所有“我的样式/css”包含项等,以及如何处理GET.[]
它只是更改url,但不会被页面处理。到目前为止,我的logo.png已经出现在我的索引上了,但到目前为止,我还没弄清楚
示例:.php?ID=9999999&group=All
我想我需要对YAML做些什么才能真正实现上述功能
此页面无法运行。游戏当前无法处理
这是我的请求。HTTP错误500
这就是我在上面的例子中得到的结果。您的
app.yaml中存在一些问题。可以将其视为将请求路由到正确目的地的正则表达式匹配过程。$
在末尾,而不是针对每个可能的匹配
试试这个:
# For better organization, let's put all your static files in a directory called "static", and include files in a directory called `includes`. A .php script is not a static file
- url: /(.*\.(ico|jpg|png|gif|htm|html|css|js|xml))$
static_files: static/\1
upload: static/.*\.(ico|jpg|png|gif|htm|html|css|js|xml)$
application_readable: true
如果将include文件放在名为includes
的目录中,它将如下所示:
- url: /includes/(.+\.php)$
script: /includes/\1
接下来,我们不要向脚本发送垃圾URL。让我们确保它匹配xxx.php
:
- url: /(.+\.php)$
script: \1