0

假设有这个 index.php

<$php
include_once("dictionary.php");
...
$>

必须如何定义 app.yaml 以上传“dictionary.php”但以不公开的方式?(以下示例让用户浏览http://mydomain/dictionary.php,这是我们要避免的)

application: myGAEphpapp
version: 1
runtime: php
api_version: 1
threadsafe: yes

handlers:

- url: /    
  script: /index.php

- url: /dictionary\.php    
  script: /dictionary.php
4

1 回答 1

0

我发现的唯一方法是在获取所有请求的句柄之后定义非公开脚本

application: myGAEphpapp
version: 1
runtime: php
api_version: 1
threadsafe: yes

handlers:

- url: /    
  script: /index.php

[...]

**- url: /.*
  script: /catchall_script.php**

#never triggered but serverside available
- url: /dictionary.\php
  script: /dictionary.php
于 2015-03-16T02:48:26.887 回答