偏方-VS不能更改Project的名字

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/zhihuier/article/details/72357164

一.问题描述如题

今天早上在弄程序的时候突然就不能更改Project 的名字,结果见下图所示.而且老子确定我的设置是没有问题的.(为了避免麻烦,压根不会去动属性设置这种话我能随便告诉你嘛?是的,我!不!会!)
这里写图片描述
于是就很烦,问题还是要解决的啊

二.问题原因

不要问我是怎么发现的,这是个并不愉快的过程.为了让自己的文件夹看起来整洁一点,老子发挥了整理房间时的无上真理:有用的放外面,没用的遮起来.嗯,于是,其实现在我的工程文件夹是下面这个样子的…..
这里写图片描述
然而显示隐藏的文件之后,它本来是下面这个样子的
这里写图片描述

三.问题解决

然后老子就把隐藏的 .vcxproj文件的属性中隐藏那个框点掉之后问题就解决了.
这里写图片描述

四.这问题都能出.

这里写图片描述
这里写图片描述

五.End.

展开阅读全文

如何更改上传图片的名字

09-05

图片上传后,文件写入数据库,图片传至IMG目录下。现在想用日期格式给图片命名,写入数据库的路径已经改成了日期格式,可图片的名字还是没更改过来,请高手帮忙赐教,万分感谢!rnrnrn<---upload.asp--->rn<%rnDim FormData, FormSize, Divider, bCrLfrnFormSize = Request.TotalBytesrnFormData = Request.BinaryRead(FormSize)rnbCrLf = ChrB(13) & ChrB(10)rnDivider = LeftB(FormData, InStrB(FormData, bCrLf) - 1)rnFunction SaveFile(FormFileField, Path, MaxSize, SavType)rn Dim StreamObj,StreamObj1rn Set StreamObj = Server.CreateObject("ADODB.Stream")rn Set StreamObj1 = Server.CreateObject("ADODB.Stream")rn StreamObj.Mode = 3rn StreamObj1.Mode = 3rn StreamObj.Type = 1rn StreamObj1.Type = 1rn SaveFile = ""rn StartPos = LenB(Divider) + 2rn FormFileField = Chr(34) & FormFileField & Chr(34)rn If Right(Path,1) <> "\" Thenrn Path = Path & "\"rn End Ifrn Do While StartPos > 0rn strlen = InStrB(StartPos, FormData, bCrLf) - StartPosrn SearchStr = MidB(FormData, StartPos, strlen)rn If InStr(bin2str(SearchStr), FormFileField) > 0 Thenrn FileName = bin2str(GetFileName(SearchStr,path,SavType))rn If FileName <> "" Thenrn FileStart = InStrB(StartPos, FormData, bCrLf & bCrLf) + 4rn FileLen = InStrB(StartPos, FormData, Divider) - 2 - FileStartrn If FileLen <= MaxSize*1024 Thenrn FileContent = MidB(FormData, FileStart, FileLen)rn StreamObj.Openrn StreamObj1.Openrn StreamObj.Write FormDatarn StreamObj.Position=FileStart-1rn StreamObj.CopyTo StreamObj1,FileLenrn If SavType =0 Thenrn SavType = 1rn End If rn StreamObj1.SaveToFile Path & FileName, SavTypern StreamObj.Closern StreamObj1.Closern If SaveFile <> "" Thenrn SaveFile = SaveFile & "," & FileNamern Elsern SaveFile = FileNamern End Ifrn Elsern If SaveFile <> "" Thenrn SaveFile = SaveFile & ",*TooBig*"rn Elsern SaveFile = "*TooBig*"rn End Ifrn End Ifrn End Ifrn End Ifrn If InStrB(StartPos, FormData, Divider) < 1 Thenrn Exit Dorn End Ifrn StartPos = InStrB(StartPos, FormData, Divider) + LenB(Divider) + 2rn LooprnEnd FunctionrnrnFunction GetFormVal(FormName)rn GetFormVal = ""rn StartPos = LenB(Divider) + 2rn FormName = Chr(34) & FormName & Chr(34)rn Do While StartPos > 0rn strlen = InStrB(StartPos, FormData, bCrLf) - StartPosrn SearchStr = MidB(FormData, StartPos, strlen)rn If InStr(bin2str(SearchStr), FormName) > 0 Thenrn ValStart = InStrB(StartPos, FormData, bCrLf & bCrLf) + 4rn ValLen = InStrB(StartPos, FormData, Divider) - 2 - ValStartrn ValContent = MidB(FormData, ValStart, ValLen)rn If GetFormVal <> "" Thenrn GetFormVal = GetFormVal & "," & bin2str(ValContent)rn Elsern GetFormVal = bin2str(ValContent)rn End Ifrn End Ifrn If InStrB(StartPos, FormData, Divider) < 1 Thenrn Exit Dorn End Ifrn StartPos = InStrB(StartPos, FormData, Divider) + LenB(Divider) + 2rn LooprnEnd FunctionrnrnFunction bin2str(binstr)rn Dim varlen, clow, ccc, skipflagrn skipflag = 0rn ccc = ""rn varlen = LenB(binstr)rn For i = 1 To varlenrn If skipflag = 0 Thenrn clow = MidB(binstr, i, 1)rn If AscB(clow) > 127 Thenrn ccc = ccc & Chr(AscW(MidB(binstr, i + 1, 1) & clow))rn skipflag = 1rn Elsern ccc = ccc & Chr(AscB(clow))rn End Ifrn Elsern skipflag = 0rn End Ifrn Nextrn bin2str = cccrnEnd FunctionrnrnFunction str2bin(str)rn For i = 1 To Len(str)rn str2bin = str2bin & ChrB(Asc(Mid(str, i, 1)))rn NextrnEnd FunctionrnrnFunction GetFileName(str,path,savtype)rn Set fs = Server.CreateObject("Scripting.FileSystemObject")rn str = RightB(str,LenB(str)-InstrB(str,str2bin("filename="))-9)rn GetFileName = ""rn FileName = ""rn For i = LenB(str) To 1 Step -1rn If MidB(str, i, 1) = ChrB(Asc("\")) Thenrn FileName = MidB(str, i + 1, LenB(str) - i - 1)rn Exit Forrn End Ifrn Nextrn If savtype = 0 and fs.FileExists(path & bin2str(FileName)) = True Thenrn hFileName = FileNamern rFileName = ""rn For i = LenB(FileName) To 1 Step -1rn If MidB(FileName, i, 1) = ChrB(Asc(".")) Thenrn hFileName = LeftB(FileName, i-1)rn rFileName = RightB(FileName, LenB(FileName)-i+1)rn Exit Forrn End Ifrn Nextrn For i = 0 to 9999 rn 'hFileName = hFileName & str2bin(i)rn If fs.FileExists(path & bin2str(hFileName) & i & bin2str(rFileName)) = False Thenrn FileName = hFileName & str2bin(i) & rFileNamern Exit Forrn End Ifrn Nextrn End Ifrn Set fs = Nothingrn GetFileName = FileNamernEnd Functionrn%>rnrnrn<---chk.asp--->rnrn<%rnautoname=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)rnset rs=Server.CreateObject("adodb.recordset")rnrs.Open "SELECT * FROM products",conn,1,3rnpath = Server.MapPath("./img/")rnfilename = SaveFile("img",path,6000,0)rnif filename<>"" thenrnIf filename <> "*TooBig*" Thenrnpath1="img/"&autoname&".jpg"rn'path1="img/"&filenamernelsernResponse.write " "rnResponse.endrnend ifrnelsernpath1="img/none.jpg"rnend ifrnrs.addnewrn rs("img")=path1rn%> 论坛

没有更多推荐了,返回首页