【发布时间】:2014-11-29 01:12:07
【问题描述】:
我正在尝试在 HHVM 中实现 Kohana 框架。我遇到的问题是,我从 Kohana View 类下的以下函数中获得“权限被拒绝”异常。 (SYSPATH/classes/view.php)。它在尝试包含模板文件时抛出异常。 (包括 $kohana_view_filename;)。在我的情况下,该文件是 /application/views/templates/default_page.php ,它具有 777 权限。我们在 Ubuntu 14.04.1 LTS 上运行 apache2。我不确定问题出在 ubuntu 还是 hhvm 上。知道如何解决吗?
protected static function capture($kohana_view_filename, array $kohana_view_data)
{
// Import the view variables to local namespace
extract($kohana_view_data, EXTR_SKIP);
if (View::$_global_data)
{
// Import the global view variables to local namespace
extract(View::$_global_data, EXTR_SKIP);
}
// Capture the view output
ob_start();
try
{
// Load the view within the current scope
include $kohana_view_filename;
}
catch (Exception $e)
{
echo $kohana_view_filename.':'.$e->getMessage().'<br/>';
// Delete the output buffer
ob_end_clean();
// Re-throw the exception
throw $e;
}
// Get the captured output and close the buffer
return ob_get_clean();
}
【问题讨论】:
-
提供的信息太少
-
对此感到抱歉...添加了更多信息。希望它会有所帮助
标签: php kohana ubuntu-14.04 hhvm