关于PHP的类 http://php.net/manual/zh/language.oop5.php
(本来想顺便学学nodejs的,但是谁有那么多精力啊。。还有js学的像狗屎一样= =)
<?php class Test { private $name; // 可以定义类的访问权限 public function __construct($name) //构造函数 { $this->name = $name; } public function echoname { echo $this->name; } } $a = new Test("This is a."); $a->echoname();
- 构造函数重载我不会,有时间再更新吧。。
- 先记录这些。