开发者

PHP doesn't seem to instantialize any classes

开发者 https://www.devze.com 2023-02-15 14:10 出处:网络
http://pastebin.com/25CwPDB2<-- Index.php http://pastebin.com/4ZTvy0kk<-- /system/Main.php This seems to happen on both a Windows and Ubuntu 10开发者_开发百科.10 server.

http://pastebin.com/25CwPDB2 <-- Index.php

http://pastebin.com/4ZTvy0kk <-- /system/Main.php

This seems to happen on both a Windows and Ubuntu 10开发者_开发百科.10 server.

The script is supposed to output:

"trying to load main"

"Autoloaded class "

"Hello from Main!"


    error_reporting("E_ALL & ~E_NOTICE");

this is wrong. you end up setting error reporting to string so it sets it to 0 ( (int)"blabla"===0 )

use

    error_reporting(E_ALL & ~E_NOTICE);


I fixed it. I output the $class in my autoload and figured out that I forgot a slash in the path. For some reason, error_reporting(-1) or error_reporting(E_ALL % ~E_NOTICE) don't show a single error even when doing include("faaaaaaaaaaaaaakepath.php")

0

精彩评论

暂无评论...
验证码 换一张
取 消