.net Core 获取网站目录

就一句话

 var path = AppContext.BaseDirectory;

生成文件就几句话

StreamWriter sw = new StreamWriter(path + "123.json");
sw.Write("hahhaha");
sw.Close();

 

posted @ 2018-11-06 16:21  Royal丶鬼才  阅读(816)  评论(0编辑  收藏  举报