A Class is clearly created, but when referenced in another php file, it prompts class not found!
世界只因有你
世界只因有你 2017-06-16 09:18:31
0
3
980

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:

世界只因有你
世界只因有你

reply all(3)
过去多啦不再A梦

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
漂亮男人

Requires SPL loader

<?php
spl_autoload_register(function ($class) {
    include 'classes/' . $class . '.php';
某草草

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template