Toc
0 results found
Seven
将类路径转换为.语法路径传递给AS[PHP]
2008/03/08 NULL 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

打赏
支付宝
微信
本文作者:Seven Chen
版权声明:本文首发于Seven Chen的博客,转载请注明出处!