扫码关注官方订阅号
下面是我的一个目录结构:
index.php
/Controller/Person.php
/Controller/Base.php
我想实现 Person 继承Base类
将代码改变后,程序初始化Person类的时候就进行不下去了 没有报错提示。 我应该怎么改这个程序,让Person继承Base这个类
欢迎选择我的课程,让我们一起见证您的进步~~
<?php namespace Controller; use \Controller\Base class Person extends Base { //code }
<?php namespace Controller; class Person extends Base { ...
即可
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
即可