我说错了
不推荐使用的:与类相同名称的方法在将来的PHP版本中将不再是构造函数;TSStatus在第10行的C:\ Program Files(x86)\ Zend \ Apache24 \ htdocs \ viewer \ modules \ tsstatus \ tsstatus.php中已弃用构造函数
TSStatus类是第10行,并在底部的TSStatus显示
class TSStatus { private $_host; private $_queryPort; private $_serverDatas; private $_channelDatas; private $_userDatas; private $_serverGroupFlags; private $_channelGroupFlags; private $_login; private $_password; private $_cacheFile; private $_cacheTime; private $_channelList; private $_useCommand; private $_javascriptName; private $_socket; public $imagePath; public $showNicknameBox; public $timeout; public $hideEmptyChannels; public $hideParentChannels; public function TSStatus($host, $queryPort) ... }
如错误所述,官方手册和评论:
更换
public function TSStatus($host, $queryPort)
与
public function __construct($host, $queryPort)