开发者

require_once problem

I have this code in the __constructor

  $this->Reliability = new Reliability("name","url");
开发者_StackOverflow

Problem: I got an unexpected strange error:

Fatal error: Class 'Reliability' not found in "/path/"

I'm using the "__autoload" method to call the required classes, but it doesn't work when I'm calling the file in a ModalBOX Window. If I request the file outside the ModalBox evrything goes fine :(

Some tricks to fix it?

thank you very much in advance!

P.S.

this is the __autoload method:

function __autoload($className) { 
  if (file_exists($className . '.php')) {   
      require_once $className . '.php'; 
      return true; 
  }

else return false; }


Is your autoloader registered in the file displayed in the modalbox?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜