我正在制作一个需要CodeIgniter 中的Teamspeak 3 库的仪表板。我现在收到一个错误,即 TeamSpeak3_Helper_Uri 尚未在 Teamspeak.php 中找到。也许它与命名有关,因为它在 Windows 机器上运行良好(现在在 Linux 上运行)。
错误:
Fatal error: Class 'TeamSpeak3_Helper_Uri' not found in /var/www/html/FlightAcademy/application/libraries/Teamspeak3/Teamspeak3.php on line 313
Teamspeak3.php 第 309 行到第 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 中的文件结构:
libraries
Teamspeak3
Adapter
Helper
Uri.php (TeamSpeak3_Helper_Uri)
...
Node
Transport
Viewer
Exeption.php
Teamspeak3.php
当我调用我的模型时发生错误:
$ts3 = TeamSpeak3::factory
我希望你能帮忙,因为我不知道出了什么问题。