Class 'TeamSpeak3_Helper_Uri' not found

我与影子孤独终老i 提交于 2019-12-11 10:19:57

问题


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:


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.



来源:https://stackoverflow.com/questions/31496587/class-teamspeak3-helper-uri-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!