【发布时间】:2015-01-21 22:08:15
【问题描述】:
我正在使用 Google App Engine (GAE) 进行 Web 开发以及 Smarty html模板引擎。
这是我在 include.php 中使用的代码段。在我部署之后 它显示我没有输出并显示这些日志。
<?php
include_once(dirname(dirname(__FILE__)) . '/includes/configs/config.inc.php');
if (!isset($_SESSION))
session_start();
$_SESSION['timestamp'] = time();
if (isset($_SESSION['auth']) && $_SESSION['auth'] === true)
$authStatus = true;
include_once(INCLUDE_DIR . '/library/util.php');
include_once(INCLUDE_DIR . '/library/connection.php');
include_once(CLASSES_DIR . 'db.class.php');
include_once(INCLUDE_DIR . '/langs/en.lang.php');
include_once(INCLUDE_DIR . '/helpers/browserDetect.class.php');
这将是我的日志输出
PHP 警告:include_once():open_basedir 限制生效。文件(/base/data/home/apps/s~/includes/configs/config.inc.php) 不在允许的路径内:(/base/data/home/apps/s~/1.380323599570411257/;/base/data/home/runtimes/php/sdk;/php_runtime/versions;/etc) 在 /base/data/home/apps/s~**/1.380323599570411257/includes.php 上线2
PHP 警告:include_once(/base/data/home/apps/s~/includes/configs/config.inc.php):无法打开流:/base/data/home/ 中不允许操作apps/s~/1.380323599570411257/includes.php 在第 2 行
这将是我的 app.yaml
application: ***
version: 1
runtime: php
api_version: 1
handlers:
- url: /css
static_dir: css
- url: /images
static_dir: images
- url: /js
static_dir: js
- url: /
script: index.php
- url: /(.+)$
script: index.php
【问题讨论】:
标签: php google-app-engine smarty yaml google-cloud-sql