How to use a class from a .php file included with 'require'? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to use a class from a .php file included with 'require'?

4th Jun 2021, 5:05 PM
‎أيوب المنتصر‎
2 Answers
+ 3
First create object of class Then use member of the class
12th Jun 2021, 6:24 AM
Gaurav Dixit🇮🇳
Gaurav Dixit🇮🇳 - avatar
0
You can instantiate it as if the class were inline.
4th Jun 2021, 5:14 PM
Leo
Leo - avatar