📄 07c01-3.php
字号:
<?php// Declare an autoload function and register it using SPLfunction __autoload($classname) { @require_once "class-{$classname}.php";}// Now create another one.function another_class_autoload($classname) { @require_once "obj-{$classname}.php";}// Check __autoload() has been declared before registering our functionif (function_exists('__autoload')) { spl_autoload_register('__autoload');}// Now register our own function.spl_autoload_register('another_class_autoload');// Instantiate an object of class 'cd'. // This will make it try to load the file: class-cd.php or obj-cd.php$mydisk = new cd();?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -