Kohana中的服务器错误

时间:2014-05-07 14:24:59

标签: kohana

快速提问。

为什么我会收到以下错误?如何解决?

require_once() [function.require-once]: open_basedir restriction in effect.
File(/lib/swift_required.php) is not within the allowed path(s):
(/home/thnk/:/tmp:/var/tmp:/usr/local/lib/php/)

谢谢!

1 个答案:

答案 0 :(得分:1)

问题解决了。问题正在发生,因为我使用的是错误的路径库。

我试图通过以下方式调用该库:

/lib/swift_required.php

它应该位于这里的某个地方:

$basePath = '/home/mydomain/domains/mydomain.org/public_html/myapp/';
require_once($basePath . 'system/vendor/swift/Swift/lib/swift_required.php');