search

Home  >  Q&A  >  body text

sql_autoload_register() method is undefined

function load($className) {
$path = $className.'php';
if (file_exists($path)) {
require_once($path);
} else {
echo $path.'The file does not exist, please check~~~';
}
}
sql_autoload_register('load');
echo (new Test('www.php. com'))->name;

小友小友2184 days ago1597

reply all(3)I'll reply

  • A 年轻在于拼

    A 年轻在于拼2019-09-17 11:35:34

    It’s so scary. I watched Peter Pig’s video for about 10 minutes. I looked and looked at it, but I didn’t find that it was sql. When I came here to watch it, I found that the correct one was spl.

    p p p ~~~~

    reply
    0
  • Langic

    Langic2018-12-19 17:59:38

    spl_autoload_register, I also made the same mistake. After using sql statements for a long time, I got used to it, hahaha

    reply
    0
  • 天蓬老师

    天蓬老师2018-12-12 09:03:34

    This is the PHP standard library function, it should start with: spl, you spelled it wrong: sql

    reply
    0
  • 小友

    Thank you for your answer

    小友 · 2018-12-12 09:04:45
  • Cancelreply