未找到类“TeamSpeak3_Helper_Uri” [英] Class 'TeamSpeak3_Helper_Uri' not found

查看:130
本文介绍了未找到类“TeamSpeak3_Helper_Uri”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在制作一个需要 Teamspeak的信息中心3库
我现在得到一个错误,TeamSpeak3_Helper_Uri在Teamspeak.php中找不到。 Perhabs它与命名有关,因为它在Windows机器上运行良好(现在在Linux上运行)。

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).

错误:

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 to 322:

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)

我在CodeIgniter中的文件结构:

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

我希望你能帮助,因为我没有什么问题。 p>

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

推荐答案

好吧,我想出了这个错误。似乎问题是Windows和Linux之间的命名约定在CodeIgniter。我通过将所有原始的TeamSpeak类命名为Teamspeak来解决了这个问题。看来这是问题。

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.

这篇关于未找到类“TeamSpeak3_Helper_Uri”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆