摘要:```
// 这是一个获取类方法和注释的方法
public function generateMethod()
{ $r = new \ReflectionClass('\think\Build'); $methods = $r->getMethods(); $string = ''; foreach ($methods as $m) { $li...
        
阅读全文
 
        
            
            
摘要:```
// 获取文件指定行数的内容
function getFileLineHandle($fileName, $linePosition)
{ $f = new \SplFileObject($fileName, 'r'); $f->seek($linePosition); try { $content = $f->getCurrentLine(); ...
        
阅读全文
 
        
            
            
摘要:``` // 获取指定开始行数$page,跨度$step的文件内容 function getLine($file_name, $start, $limit) { $f = new SplFileObject($file_name, 'r'); $f->seek($start); $ret = ""; for ($i = 0; $i getCurrentLine();...
        
阅读全文
 
        
            
            
摘要:```
// 获取文件行数
function getFileLineCount($fileName)
{ $fp = fopen($fileName, "r"); $line = 0; while (!feof($fp)) { //每次读取1M if ($data = fread($fp, 1024 * 1024 * 1)) { ...
        
阅读全文