abstract:<?php class Car { public $brand; public $model; public $price; public func
<?php class Car { public $brand; public $model; public $price; public function __construct($brand, $model, $price) { $this->brand = $brand; $this->model = $model; $this->price = $price; } }
<?php //echo __DIR__; spl_autoload_register(function($className){ // echo __DIR__ . '/public/' . $className . '.php'; require __DIR__ . '/public/' . $className . '.php'; }); $car = new Car('丰田', '汉兰达', 350000); echo $car->brand, $car->model, ':' , $car->price;
Correcting teacher:天蓬老师Correction time:2019-05-17 17:49:53
Teacher's summary:为什么不自己想一个案例呢, 自己想一下很难吗? 尽可能不要照抄