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;
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 ~~~~
spl_autoload_register, I also made the same mistake. After using sql statements for a long time, I got used to it, hahaha
This is the PHP standard library function, it should start with: spl, you spelled it wrong: sql
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 ~~~~
spl_autoload_register, I also made the same mistake. After using sql statements for a long time, I got used to it, hahaha
This is the PHP standard library function, it should start with: spl, you spelled it wrong: sql