I am a student in the school, PHP has just finished learning the object-oriented part, is currently understanding the use of SPL library, found that some of the SPL is not a good understanding of the project root directory is as follows ... Also hope that the gods are pointing twos
PSR-0
├──app
│└──controller
│└──home
│└──revamp.php
├──users
│├──loader.php
│└──object.php
└──index.php
The load classes are as follows loader.php
Revamp.php
入口文件如下index.php:
第二个 Revamp类的加载为何会一直有问题?出现HTTP500错误
Reply content:
I am a student in the school, PHP has just finished learning the object-oriented part, is currently understanding the use of SPL library, found that some of the SPL is not a good understanding of the project root directory is as follows ... Also hope that the gods are pointing twos
PSR-0
├──app
│└──controller
│└──home
│└──revamp.php
├──users
│├──loader.php
│└──object.php
└──index.php
The load classes are as follows loader.php
Revamp.php
入口文件如下index.php:
第二个 Revamp类的加载为何会一直有问题?出现HTTP500错误
打开错误显示,看看具体的错误是什么。估计你这个情况和 ClassName 的处理有关,注意类名前面还有一个斜杠的
看你发的目录结构,Controller和Home放在同一级了
我按照你的代码敲了一遍,没做任何改变,可以正常输出~