我有一个结构,像这样:扩展与命名空间一类是说找不到类
index.php
core
Exceptions
ExceptionCore.php
ExceptionUtil.php
Vendor
autoload stuff
索引文件:
<?php
require 'vendor/autoload.php';
new \core\Exceptions\ExceptionCore\ExceptionCore();
ExceptionCore:
<?php
Namespace core\Exceptions\ExceptionCore;
Class ExceptionCore
{
public function __construct()
{
echo 'fffhf';
}
}
但我得到错误:
Fatal error: Uncaught Error: Class 'core\Exceptions\ExceptionCore\ExceptionCore' not found in C:\xampp\htdocs\user\index.php:5 Stack trace: #0 {main} thrown in C:\xampp\htdocs\user\index.php on line 5
被保存在正确的位置的ExceptionCore文件? –
据我所知http://i.imgur.com/A7sPG6R.png – 4334738290
该文件需要在'user/core/Exceptions/ExceptionCore' –