search

Home  >  Q&A  >  body text

Why does the autoloader.php file know that $className represents test

function __autoload($className)

{

$path = $className.'.php'; //test.php

if (file_exists($path )) {

require_once($path);

}else {

echo $path."Does not exist, please check~~";

}

}

familyfamily1925 days ago1261

reply all(1)I'll reply

  • 卢小强

    卢小强2019-11-16 08:55:17

    autoload() is an automatic loading function. $className in Chinese means class name, and $className is a variable. The value you pass is xxxx.php

    reply
    0
  • Cancelreply