The following file content. Tool1.php {code ...} tool2.php {code ...} u. php {code ...} what we want to achieve now is that it can be written like C #, for example, {code ...} the purpose is that if the namespace is the same, you only need to reference it once, you can use multiple classes in it ,... the following file content.
Tool1.php
namespace MyTools;class tool1{}
Tool2.php
namespace MyTools;class tool2{}
U. php
include MyTools\tool1;include MyTools\tool2;$t1 = new tool1();$t2 = new tool2();
What we want to achieve now is that it can be written as C #, for example
include MyTools;$t1 = new tool1();$t2 = new tool2();
The purpose is, if the namespace is the same, you only need to reference it once, you can use multiple classes in it, how should you write ...?
Reply content:
The following file content.
Tool1.php
namespace MyTools;class tool1{}
Tool2.php
namespace MyTools;class tool2{}
U. php
include MyTools\tool1;include MyTools\tool2;$t1 = new tool1();$t2 = new tool2();
What we want to achieve now is that it can be written as C #, for example
include MyTools;$t1 = new tool1();$t2 = new tool2();
The purpose is, if the namespace is the same, you only need to reference it once, you can use multiple classes in it, how should you write ...?
Automatic loading...
class