Error message:
Fatal error: Uncaught Error: Class 'frameworkdbMysqli' not found in C:Users11500DesktopdemoProjecttestTest.php:7 Stack trace: #0 {main} thrown in C:Users11500DesktopdemoProjecttestTest.php on line 7
Project directory:
Class file:
Another php file:
过去多啦不再A梦2017-06-16 09:20:31
You didn’t import the file, so PHP certainly doesn’t know where your class definition is = =
require '../db/Mysqli.php';
Add
at the beginning of the test file漂亮男人2017-06-16 09:20:31
Requires SPL loader
<?php
spl_autoload_register(function ($class) {
include 'classes/' . $class . '.php';
某草草2017-06-16 09:20:31
For example,
use I want to use Huashan Sword Sect Dugu Nine Swords instead of Huashan Qi Sect Dugu Nine Swords
Of course, the prerequisite for you to use it is that you have it, everything is required