asp.net ÉÏ´«ÅжÏÎļþÊÇ·ñΪͼƬ
private bool IsPicture(string filePath)//filePathÊÇÎļþµÄÍêÕû·¾¶
{
try
{
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
BinaryReader reader = new BinaryReader(fs);
string fileClass;
byte buffer;
byte[] b=new byte[2];
buffer = reader.ReadByte();
b[0] = buffer;
fileClass = buffer.ToString();
buffer = reader.ReadByte();
b[1]=buffer;
fileClass += buffer.ToString();
reader.Close();
fs.Close();
if (fileClass == "255216 ")//255216ÊÇjpg;7173ÊÇgif;6677ÊÇ
Ïà¹ØÎĵµ£º
±¾ÎĽéÉÜASP.NET Web GardenÄ£ÐÍ£¬Web GardenÄ£ÐÍ¿ÉÒÔͨ¹ý machine.config ÎļþÖÐµÄ ²¿·Ö½øÐÐÅäÖá£
Web GardenÄ£ÐÍ
Web GardenÄ£ÐÍ¿ÉÒÔͨ¹ý machine.config ÎļþÖÐµÄ <processModel> ²¿·Ö½øÐÐÅäÖá£Çë×¢Ò⣬<processModel> ²¿·ÖÊÇΨһ²»ÄÜ·ÅÔÚÓ¦ÓóÌÐòÌØ¶¨µÄ web.config ÎļþÖеÄÅäÖò¿·Ö¡£Õâ¾ÍÊÇ˵£¬Web ......
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('¼ÓÈëÔÝ´æ¼Ü³É¹¦£¡');</script>");
asp.net¼òµ¥¼ÓÃÜ
//using System.Web.Security;
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfig ......
Ò»¡¢×Ô¶¨Òå FCKeditor µÄ BasePathBasePath ¼´FCKeditorÔÚÍøÕ¾ÖеÄÏà¶Ô·¾¶£¬Ä¬ÈÏÖµÊÇ /fckeditor/£¬×îºÃÔÚWeb.config appSettingsÖÐ¶ÔÆä½øÐÐÅäÖãº
<add key="FCKeditor:BasePath" value="/FCKeditor_2.6.3/"/>
ÕâÑù×öÓÐÖî¶àÓŵ㣺
1.¿ª·¢»·¾³ÓëÉú²ú»·¾³²»Í¬£¬¿ª·¢»·¾³Ò»°ãÊÇhttp://localhost/xxx.com/ÕâÖÖÇé¿öÏ ......