How to load another class file in php

WJ
Release: 2023-03-01 14:08:02
Original
2524 people have browsed it

How to load another class file in php

#How does a php class file load another class file method?

There are a.php and b.php under the current file. I want to introduce class a into class b

name;
        }
    }
Copy after login
name = 'erbao';
            $person->say();
        }
    }
    $person3 = new b();
    $person3->usea();
Copy after login

Related recommendations: php tutorial

The above is the detailed content of How to load another class file in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!