【转】PHP通过类名查找这个类所在的文件 路径

  1. class counter  
  2.   {  
  3.       static $c = 0;  
  4.       return $c++;  
  5.   }  
  6.   
  7.  Create an instance of the Reflection_Function class  
  8.   $func = new ReflectionClass('counter');  
  9.  echo    $func->getFileName();  
原文地址:https://www.cnblogs.com/ccymme/p/6605200.html