PHP致命错误:未捕获错误:找不到类 [英] PHP Fatal error: Uncaught Error: Class not found

查看:65
本文介绍了PHP致命错误:未捕获错误:找不到类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学说教程,这里是官方的网站.而且在开始使用产品实体"部分时出现错误.

I am trying to go trough tutorial of doctrine here is official website. And I got an error in Starting with the Product Entity part.

这是我写给终端的内容: $ php create_product.php ORM

This is what I write to terminal: $ php create_product.php ORM

PHP Fatal error:  Uncaught Error: Class 'product' not found in /home/vaclav/Server/vssk/VSSK/project/create_product.php:8
Stack trace: #0 {main}
  thrown in /home/vaclav/Server/vssk/VSSK/project/create_product.php on line 8

推荐答案

通过添加解决:

require_once 'patch_to_your_class/Product.php';

create_product.php .

这篇关于PHP致命错误:未捕获错误:找不到类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆