string time="2010-09-11 12:00:01"
filename="aa.JPG";
string month= time.Substring(5, 2);为什么我把代码发布到服务器上后
path = Server.MapPath("~/CaptureData" + "/" + time.Substring(0, 4) + "/" +"09"+ "/" + filename);
if (File.Exists(path))
{
fs = new FileStream(path, FileMode.Open, FileAccess.Read);
}
能显示出图片
而
path = Server.MapPath("~/CaptureData" + "/" + time.Substring(0, 4) + "/" + month+ "/" + filename);
if (File.Exists(path))
{
fs = new FileStream(path, FileMode.Open, FileAccess.Read);
}却显示不出图片.
请问为什么,很急,谢谢!
filename="aa.JPG";
string month= time.Substring(5, 2);为什么我把代码发布到服务器上后
path = Server.MapPath("~/CaptureData" + "/" + time.Substring(0, 4) + "/" +"09"+ "/" + filename);
if (File.Exists(path))
{
fs = new FileStream(path, FileMode.Open, FileAccess.Read);
}
能显示出图片
而
path = Server.MapPath("~/CaptureData" + "/" + time.Substring(0, 4) + "/" + month+ "/" + filename);
if (File.Exists(path))
{
fs = new FileStream(path, FileMode.Open, FileAccess.Read);
}却显示不出图片.
请问为什么,很急,谢谢!
string time = dt_time.Rows[0]["Time"].ToString();在本地跟踪时time是等于 "2010-09-11 12:00:01"
而我发布到本地服务器上时time是 "2010-9-11 12:00:01"请问这是为什么啊?请高手指点!