asp.net获取当前页面的文件名
string url = Request.FilePath.ToString();
string file = url.Substring(url.LastIndexOf("/") + 1);
相关推荐
Python:获取当前py的文件名
采用pathlib库frompathlibimportPathPath(__file__).name
时间:2024-03-30 07:35
string url = Request.FilePath.ToString();
string file = url.Substring(url.LastIndexOf("/") + 1);
采用pathlib库frompathlibimportPathPath(__file__).name