将类路径转换为.语法路径传递给AS[PHP]
define(“ROOT_PATH”,“/xxx/yyy/zzz/”);
function A (){
$this->rootPath = ROOT_PATH;
$this->file = __FILE__;
return $this->classRoot = basename(str_replace(“/”,“.”,str_replace(“$this->rootPath” ,“”, $this->file)),“.php”);
}
humen1 Tech