php类的定义与继承用法实例

上传:baoer71868 浏览: 9 推荐: 0 文件:PDF 大小:32.41KB 上传时间:2020-12-31 07:16:38 版权申诉
本文实例讲述了php类的定义与继承用法。分享给大家供大家参考。具体如下: <?php /* * class */ class people { public $name; public $age; function __construct($namec,$agec) { $this->name = $namec; $this->age = $agec; } protected function getmessage() { return "姓名:".$this->name.""."年龄:".$this->age; } f
上传资源
用户评论