Questions tagged «php-parse-error»

3
类可以扩展类并实现接口吗
一个类可以在PHP中同时扩展接口和另一个类吗? 基本上我想这样做: interface databaseInterface{ public function query($q); public function escape($s); //more methods } class database{ //extends both mysqli and implements databaseInterface //etc. } 只需执行以下操作即可做到这一点: class database implements databaseInterface extends mysqli{ 导致致命错误: 解析错误:语法错误,意外的T_EXTENDS,在* file *行* line *上预期为“ {”
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.