Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/160.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我的php页面会在google应用程序引擎中下载?_Php_Google App Engine - Fatal编程技术网

为什么我的php页面会在google应用程序引擎中下载?

为什么我的php页面会在google应用程序引擎中下载?,php,google-app-engine,Php,Google App Engine,请帮忙解决一个问题! 我的PHP脚本没有执行,它是在Google AppEngine中下载的。 如何解决这个问题 app.yaml: application: web-sites-testing version: 1 runtime: php api_version: 1 threadsafe: yes handlers: - url: /(.+\.php)$ script: \1 - url: /main.php script: mai

请帮忙解决一个问题! 我的PHP脚本没有执行,它是在Google AppEngine中下载的。 如何解决这个问题

app.yaml:

application: web-sites-testing    
version: 1    
runtime: php    
api_version: 1    
threadsafe: yes

handlers:    
- url: /(.+\.php)$
  script: \1    
- url: /main.php
  script: main.php

你能在app.yaml中更改url处理程序的顺序吗?根据我的说法,它应该如下所示:

处理程序:
-url:/main.php 脚本:main.php

-url:/(.+.php)$ 脚本:\1


根据我的理解,它应该是有效的。如前所述,/main.php URL传递正则表达式(/(.php+)$)处理程序,因此它尝试运行脚本\1(因为没有定义脚本)。更改顺序时,main.php URL处理程序将首先出现,因此它将由main.php脚本处理。

我将此作为第一个处理程序添加:

- url: /(.+\.php)$
  script: \1
现在我的app.yaml看起来像这样:

runtime: php55
api_version: 1
threadsafe: true

handlers:
- url: /(.+\.php)$
  script: \1    

- url: /
  static_files: www/index.html
  upload: www/index.html

- url: /(.*)
  static_files: www/\1
  upload: www/(.*)

php文件按预期执行

不,它仍在下载。这是您完整的app.yaml文件吗?您是否有任何导致“下载”的静态文件处理程序()。