2013-02-23 29 views
0

任何人都可以让我知道为什么自动加载器错误出现在symfony2中。 它是什么parmenanat解决方案。我已经与供应商下载symfony2版本,所有的东西都正常工作接受当我插入一个自定义类,并尝试使用它总是提出一个自动加载错误,请给我它的解决方案。错误信息如下。为什么自动加载器错误出现在symfony2中

The autoloader expected class "Blogger\BlogBundle\Entity\Enquiry" 
to be defined in file 
"D:\wamp\www\Symfony/src/\Blogger\BlogBundle\Entity\Enquiry.php". 
The file was found but the class was not in it, 
the class name or namespace probably has a typo. 

这里是查询类。

<?php 

namespace Blogger\BlogBungle\Entity; 

class Enquiry 
{ 

protected $name; 
protected $email; 
protected $subject; 
protected $body; 

public function getName() 
{ 
    return $this->name; 

} 
public function setName($name) 
{ 
    $this->name = $name; 
} 
public function getEmail() 
{ 
    return $this->email; 
} 
public function setEmail($email) 
{ 
    $this->email = $email; 
} 
public function getSubject() 
{ 
    return $this->subject; 
} 
public function setSubject($subject) 
{ 
    $this->subject = $subject; 
} 
public function getBody() 
{ 
    return $this->body; 
} 
public function setBody($body) 
{ 
    $this->body = $body; 
} 


} 


?> 
+0

请发表您的'Enquiry'类。 – gremo 2013-02-23 11:25:29

+0

没有它仍然显示相同的错误 – 2013-02-23 11:43:04

回答

3

查看错误消息

namespace Blogger\BlogBungle\Entity; 

Blogger\BlogBundle\Entity\Enquiry 

之间的差异? 当您定义您的名称空间时,BlogBu​​ngle应为BlogBu​​ndle

相关问题