include的前提是class
<?php class teacher{ public $name='huahua'; public function callName(){ echo $this->name; } }
<?php include './demo.php'; $teacher=new teacher; $teacher->callName();
include的前提是class
<?php class teacher{ public $name='huahua'; public function callName(){ echo $this->name; } }
<?php include './demo.php'; $teacher=new teacher; $teacher->callName();
转载于:https://www.cnblogs.com/xiaobiaomei/p/8074628.html