Ejemplo n.º 1
0
        public ActionResult GetMenu()
        {
            ///记录调用次数
            var logPath = Server.MapPath(string.Format("~/App_Data/MP/{0}/", DateTime.Now.ToString("yyyy-MM-dd")));

            if (!Directory.Exists(logPath))
            {
                Directory.CreateDirectory(logPath);
            }
            using (StreamWriter sw = new StreamWriter(logPath + "getmenu.txt", true, Encoding.UTF8))
            {
                sw.WriteLine("调用一次");
            }
            return(Content(CustomMenu.GetMenu()));
        }