thinkphp3.2 加载第三方类问题

浏览:896 发布日期:2014/08/12 分类:求助交流 关键字: thinkphp3.2 第三方类 construct 构造无效
thinkphp3.2 加载第三方类,第三方类中的__construct构造无效。
代码如下:
Vendor('xs_sdk.lib.XS');
$xs = new XS('data');
$docs = $xs->search->search('问题');
print_r($docs);
exit;
第三方类构造函数代码:
public function __construct($file)
{
if (strlen($file) < 255 && !is_file($file)) {
$file2 = XS_LIB_ROOT . '/../app/' . $file . '.ini';
if (is_file($file2)) {
$file = $file2;
}
}
$this->loadIniFile($file);
self::$_lastXS = $this;
}

用的是迅搜全文索引第三方类,不加入到TP控制器运行没有问题的,加到控制运行无法加载第三方构造函数,有没有人遇到同样问题,help me!
最佳答案
评论( 相关
后面还有条评论,点击查看>>