【发布时间】:2015-03-16 01:13:10
【问题描述】:
假设有这个 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
【问题讨论】:
-
你为什么把它作为一个处理程序放在首位?
include_once不是在服务器端工作,因此没有必要将其公开? -
我不明白你的问题:如果你不在 app.yaml 上声明,你如何将 dictionaty.php 上传到 GAE 服务器?
-
您目录中的所有内容都将被上传。
-
明白了。那么为什么存在“static_files”和app_readable声明呢?
-
静态文件的目的是将它们移动到 CDN,因此它们将无法从您的应用程序中使用,但请求也不会到达您的服务器。
标签: php google-app-engine app.yaml