PHP已弃用:具有相同名称的方法
发布时间:2020-12-13 21:28:44 所属栏目:PHP教程 来源:网络整理
导读:我收到一个错误说 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; TSStatus has a deprecated constructor in C:Program Files (x86)ZendApache24htdocsviewermodulestsstatustsstat
我收到一个错误说
类TSStatus是底部TSStatus显示的第10行加 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) ... } 解决方法
如错误中提到的,the official manual和评论:
更换 public function TSStatus($host,$queryPort) 同 public function __construct($host,$queryPort) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |