开发者

require_once problem

开发者 https://www.devze.com 2023-01-07 03:12 出处:网络
I have this code in the __constructor $this->Reliability = new Reliability(\"name\",\"url\"); 开发者_StackOverflow

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

精彩评论

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