现有a.php 和 b.php在同一个目录下

a.php中

namespace myspace;

class A{

  __construct(){}

  ....

}

b.php中调用类A

require_once('./a.php ');

$obj = new \myspace\A();

 

相关文章:

  • 2022-01-20
  • 2021-11-17
  • 2021-07-16
猜你喜欢
  • 2021-07-06
  • 2021-09-10
  • 2021-07-20
  • 2021-11-14
相关资源
相似解决方案