lib/adapter/Wind.php
private function getTplPath($file, $subDir = null)
    {
        if ($subDir === null) {
            $subDir = $this->cfg['tplSubDir'];
        }
        
        $tplDir = rtrim($this->cfg['tplDir'] . '/' . $subDir, '\\/');
        
        if (preg_match_all("/\\{(.*?)\\}/", $tplDir, $match)) {
            // 用$file参数中的字符串替换tplDir中的替换参数
            $fileArr = explode('/', $file);
            foreach ($match[1] as $matchItem) {
                $tplDir = str_replace("{{$matchItem}}", $fileArr[$matchItem], $tplDir);
                unset($fileArr[$matchItem]);
            }
            $file = implode('/', $fileArr);
        }
        
        $tplFile = "{$tplDir}/{$file}";
        
        return $tplFile;
    }
private function getTplPath($file, $subDir = null)
    {
        if ($subDir === null) {
            $subDir = $this->cfg['tplSubDir'];
        }
        
        $tplDir = rtrim($this->cfg['tplDir'] . '/' . $subDir, '\\/');
        
        if (preg_match_all("/\\{(.*?)\\}/", $tplDir, $match)) {
            // 用$file参数中的字符串替换tplDir中的替换参数
            $fileArr = explode('/', $file);
            foreach ($match[1] as $matchItem) {
                $tplDir = str_replace("{{$matchItem}}", $fileArr[$matchItem], $tplDir);
                unset($fileArr[$matchItem]);
            }
            $file = implode('/', $fileArr);
        }
        
        $tplFile = "{$tplDir}/{$file}";
        
        return $tplFile;
    }
获取模板文件路径
@param string $file
@param string $subDir = null
@return string