Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何获取yii配置的main.php中定义的logPath?我试过了 ,
CFileLogRoute::getLogPath();
不起作用,大声笑,我不知道如何正确调用它以输出它的值
不知道为什么你需要这条路,但它是这样的:
foreach(Yii::app()->log->routes as $route) { if($route instanceof CFileLogRoute) { echo "logPath: ".$route->logPath; } }