douxi1968 2015-07-18 23:35
浏览 42
已采纳

找不到“TeamSpeak3_Helper_Uri”类

I'm making a dashboard that requires the Teamspeak 3 library in CodeIgniter. I now get an error that the TeamSpeak3_Helper_Uri has not been found in Teamspeak.php . Perhabs it has something to do with naming because it has running fine on a Windows machine (now running on Linux).

The error:

Fatal error: Class 'TeamSpeak3_Helper_Uri' not found in /var/www/html/FlightAcademy/application/libraries/Teamspeak3/Teamspeak3.php on line 313

Teamspeak3.php line 309 till 322:

 public static function factory($uri) {
self::init();

$uri = new TeamSpeak3_Helper_Uri($uri); // <-- Line 313

$adapter = self::getAdapterName($uri->getScheme());
$options = array("host" => $uri->getHost(), "port" => $uri->getPort(), "timeout" => intval($uri->getQueryVar("timeout", 10)), "blocking" => intval($uri->getQueryVar("blocking", 1)));

self::loadClass($adapter);

$object = new $adapter($options);

if($object instanceof TeamSpeak3_Adapter_ServerQuery)

My file structure in CodeIgniter:

libraries
    Teamspeak3
        Adapter
        Helper
            Uri.php (TeamSpeak3_Helper_Uri)
            ...
        Node
        Transport
        Viewer
        Exeption.php
        Teamspeak3.php

The error occurs when I call in my model:

$ts3 = TeamSpeak3::factory

I hope you can help because I have no clue what's wrong.

  • 写回答

1条回答 默认 最新

  • dongwei7913 2015-07-19 16:59
    关注

    Ok so, I have figured out this error. It seems that the problem is the naming convention between Windows and Linux in CodeIgniter. I solved the problem by naming all original "TeamSpeak" classes to "Teamspeak". It seems that this was the issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog