Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.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
谷歌应用程序引擎jQuery可以';我不能访问我的php文件_Php_Jquery_Google App Engine - Fatal编程技术网

谷歌应用程序引擎jQuery可以';我不能访问我的php文件

谷歌应用程序引擎jQuery可以';我不能访问我的php文件,php,jquery,google-app-engine,Php,Jquery,Google App Engine,在我的GoogleAppEngine根文件夹中有一个名为functions.php的文件,我使用jQuery将值发布到该文件中,但我得到一个500代码错误。可能是因为我的url处理,它被设置为 我试图将functions.php移到一个静态文件夹,但它根本不起作用,页面甚至不显示。 有什么建议吗?(请注意,它在普通服务器上运行良好) 以下是我的完整app.yaml代码: application: myapp version: 1 runtime: php api_version: 1 hand

在我的GoogleAppEngine根文件夹中有一个名为functions.php的文件,我使用jQuery将值发布到该文件中,但我得到一个500代码错误。可能是因为我的url处理,它被设置为 我试图将functions.php移到一个静态文件夹,但它根本不起作用,页面甚至不显示。 有什么建议吗?(请注意,它在普通服务器上运行良好)

以下是我的完整app.yaml代码:

application: myapp
version: 1
runtime: php
api_version: 1

handlers:
- url: /css
  static_dir: css
- url: /scripts
  static_dir: css
- url: /assets
  static_dir: assets
- url: /styles
  static_dir: styles    
- url: /includer
  static_dir: includer   
- url: /.*
  script: index.php

你是如何调用functions.php文件的

在你的app.yaml中,你没有调用它的功能

app.yaml中唯一可调用的php脚本是index.php(app.yaml中的最后一个处理程序)

我想您已经将functions.php放在静态目录“includer”中了

静态意味着静态,它不会作为动态文件运行

但是,如果要将值发布到function.php文件中,则需要添加如下新URL:

- url: /functions/.*
  script: functions.php
将此处理程序放在最后一个处理程序之前

有了它,您可以使用jquery将值发布到站点/函数

使用此链接进行进一步澄清:
由于代码中的这些行,存储在根文件夹中的所有
php
文件都被重定向到
index.php

- url: /.*
  script: index.php
如果根文件夹中有许多“.php”文件,则在
app.yaml
中为每个文件创建一个条目。例如:

- url: /index.php
  script: index.php

- url: /file1.php
  script: file2.php

- url: /file3.php
  script: file3.php
或者,您可以简单地为所有php文件添加以下行

- url: /(.*)\.php
  script: \1.php