我制作的仪表板需要CodeIgniter中的Teamspeak 3 library。 我现在收到一个错误,即在Teamspeak.php中找不到TeamSpeak3_Helper_Uri。 Perhabs它与命名有关,因为它在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
我希望你能提供帮助,因为我不知道错误是什么。
答案 0 :(得分:0)
好的,我已经弄明白了这个错误。似乎问题是CodeIgniter中Windows和Linux之间的命名约定。我通过将所有原始“TeamSpeak”类命名为“Teamspeak”来解决问题。这似乎是问题所在。