为了账号安全,请及时绑定邮箱和手机立即绑定

php 送我的类不存 为什么会报错 Fatal error: Class 'shoproduct' not found in

php 送我的类不存 为什么会报错 Fatal error: Class 'shoproduct' not found in

PHP
慕UI1458911 2018-02-23 18:41:39
<?phpclass ShoProductWriter{ public function write($shoproduct) { $str = "{$shoproduct->title}".$shoproduct->getProducer()."({$shoproduct->price})"; print $str; }}$c = new ShoProductWriter();$shoproduct1 = new shoproduct();
查看完整描述

2 回答

?
qq_嗨那谁快跑_0

TA贡献1条经验 获得超0个赞

shoproduct 类不存在,需要创建这个shoproduct类

查看完整回答
反对 回复 2018-05-14
?
我就是癈

TA贡献1条经验 获得超0个赞

应该是这一行出错

$shoproduct1 = new shoproduct();

你没有定义 class shoproduct

查看完整回答
反对 回复 2018-02-24
  • 2 回答
  • 0 关注
  • 1161 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信