我正在尝试使用 codeigniter web 框架开发一个 teampeak web 应用程序。现在我遇到了一个问题。
我收到以下错误:
Fatal error: Class 'TeamSpeak3_Helper_Profiler' not found in C:\xampp\htdocs\project\teamspeak\application\libraries\ teamspeak\TeamSpeak3.php on line 550
A PHP Error was encountered
Severity: Error
Message: Class 'TeamSpeak3_Helper_Profiler' not found
Filename: teamspeak/TeamSpeak3.php
Line Number: 550
Backtrace:
我的库文件夹结构:
C:\XAMPP\HTDOCS\PROJECT\TEAMSPEAK\APPLICATION\LIBRARIES
│ Bcrypt.php
│ Curl.php
│ index.html
│ Ion_auth.php
│
└───teamspeak
│ Exception.php
│ TeamSpeak3.php
│
├───Adapter
│ │ Abstract.php
│ │ Blacklist.php
│ │ Exception.php
│ │ FileTransfer.php
│ │ ServerQuery.php
│ │ TSDNS.php
│ │ Update.php
│ │
│ ├───Blacklist
│ │ Exception.php
│ │
│ ├───FileTransfer
│ │ Exception.php
│ │
│ ├───ServerQuery
│ │ Event.php
│ │ Exception.php
│ │ Reply.php
│ │
│ ├───TSDNS
│ │ Exception.php
│ │
│ └───Update
│ Exception.php
│
├───Helper
│ │ Char.php
│ │ Convert.php
│ │ Crypt.php
│ │ Exception.php
│ │ Profiler.php
│ │ Signal.php
│ │ String.php
│ │ Uri.php
│ │
│ ├───Profiler
│ │ Exception.php
│ │ Timer.php
│ │
│ └───Signal
│ Exception.php
│ Handler.php
│ Interface.php
│
├───Node
│ Abstract.php
│ Channel.php
│ Channelgroup.php
│ Client.php
│ Exception.php
│ Host.php
│ Server.php
│ Servergroup.php
│
├───Transport
│ Abstract.php
│ Exception.php
│ TCP.php
│ UDP.php
│
└───Viewer
Html.php
Interface.php
Text.php
我的控制器构造函数:
function __construct(){
parent::__construct();
$this->load->database();
$this->load->library(array('form_validation', 'teamspeak/teamspeak3'));
$this->load->helper(array('url'));
$this->form_validation->set_error_delimiters($this->config->item('error_start_delimiter', 'ion_auth'), $this->config->item('error_end_delimiter', 'ion_auth'));
}
我尝试像这样加载函数:
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://myquerry user:mysecretpassword@mysearveraddress:10011/?server_port=9987");
$ts3_VirtualServer->clientGetByName("My_User")->kick(TeamSpeak3::KICK_SERVER, "My kick message");