Class 'TeamSpeak3_Helper_Uri' not found

2019-08-02 00:58发布

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条回答
孤傲高冷的网名
2楼-- · 2019-08-02 01:49

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.

查看更多
登录 后发表回答