.htaccess文件RewriteRule^(.*).html$index.php?id=$1对于一个网址http://www.jb51.net/我是谁.html我们将会遇到以下4种情况http://www.jb51.net/我是谁.html(这里的”我是谁”是GB2312编码)IE打开,接收到的id是utf8编码的”我是谁”FireFox打开,接收不到id值,并且Apache会出现403错误。这里需要着重说明一下,因为FireFox会将”我是谁”自动urlencode,如果你的页面链接中”我是谁”的编码是gb2312就会出错。http://www.jb51.net/我是谁.html(这里的...
http://www.jb51.net//article/16073.htm
[code]---sendmail.inc.original.php+++sendmail.inc.mime.php@@-33,23+33,23@@$email_subject='=?'.$charset.'?B?'.base64_encode(str_replace("\r",'',str_replace("\n",'','['.$bbname.']'.$email_subject))).'?=';$email_message=chunk_split(base64_encode(str_replace("\r\n.","\r\n..",str_replace("\n","\r\n",str_...
http://www.jb51.net//article/15923.htm
在阅读本文之前,请先看一看第一篇文章Javascript拖拽系列文章1之offsetParent属性,因为循序渐进是一个很好的习惯,值得提倡。好了,看看我们今天的内容吧。首先让我们先看一看element.offsetLeft属性。支持的浏览器:InternetExplorer4.0+,Mozilla1.0+,Netscape6.0+,Opera7.0+,Safari1.0+定义:返回一个像素数值,它表示当前元素的左边缘到它的offsetParent属性返回的对象左边缘的偏移量。句法:leftDis=element.offsetLeftoffsetLeft属性在InternetExplorer中...
http://www.jb51.net//article/15921.htm
Donotusethesehtmlelementsinhtmlpages. Presentationalelementsshouldnotbeused. Supportforsomeelementshasbeen(orwillbe)deprecated;theyshouldnotbeused. Don'tUseTheseTagsPresentationalbbighrismallsubsupttDeprecatedbasefontcenterdirfontisindexmenusstrikeuUnsupportedandDamaginginPracticetfootCommentsLog...
http://www.jb51.net//article/15917.htm
[code]publicstaticStringhtmlToStr(StringhtmlStr){Stringresult="";booleanflag=true;if(htmlStr==null){returnnull;}htmlStr=htmlStr.replace("\"","");//去掉引号char[]a=htmlStr.toCharArray();intlength=a.length;for(inti=0;i<length;i++){if(a[i]=='<'){flag=false;continue;}if(a[i]=='>'){flag=true;continu...
http://www.jb51.net//article/15841.htm
在做页面的时候,经常要根据不同的操作来显示或隐藏一个表格中的部分内容,隐藏一行直接用<tr>标签,隐藏多行时用<tbody>就很方便。<table><tbodyid="content1"><tr><td>表单内容</td></tr></tbody><tbodyid="content2"style="display:none"><tr><td>多行内容</td></tr><tr><td>多行内容</t...
http://www.jb51.net//article/15783.htm
[code]staticstringGetEncoding(stringurl){HttpWebRequestrequest=null;HttpWebResponseresponse=null;StreamReaderreader=null;try{request=(HttpWebRequest)WebRequest.Create(url);request.Timeout=20000;request.AllowAutoRedirect=false;response=(HttpWebResponse)request.GetResponse();if(response.StatusCode==Ht...
http://www.jb51.net//article/15764.htm
1、很多兼容性问题,是因为不同标签在不同浏览器下有着不同的paddingmargin默认值。所以可以事先定义[code]*{padding:0;margin:0;}[/code]或者[code]ul,li,h1,h2,h3,h4,h5,h6,p,table,td,div,img,hr,dd,dt,span,a,dt,dd,ol{margin:0;padding:0;font-size:12px;}[/code]2、关于布局,可以看dreamweavercs3里的模板怎么写的,它的写法是最好的写法。大的布局,可以直接使用dreamweavercs3里默认的那些模板。然后去掉注释,就能用了。3、适...
http://www.jb51.net//article/15758.htm
ContentTypes:"ez","application/andrew-inset"ContentTypes:"hqx","application/mac-binhex40"ContentTypes:"cpt","application/mac-compactpro"ContentTypes:"doc","application/msword"ContentTypes:"bin","application/octet-stream"ContentTypes:"dms","application/octet-stream"ContentTypes:"lha","application/oct...
http://www.jb51.net//article/15743.htm
它可以在网页中对各种程序源代码语法进行加亮显示。支持当前流行的各种编程语言:C#、CSS、C++、Delphi、Java、JavaScript、PHP、Python、Ruby、SQL、VisualBasic、XML/HTML下载地址:http://www.dreamprojections.com/syntaxhighlighter/或http://code.google.com/p/syntaxhighlighter/演示地址:http://www.dreamprojections.com/syntaxhighlighter/Tests/PHP.html该工具核心基于javascript,使用...
http://www.jb51.net//article/15741.htm
例一:使用httplib访问某个url然后获取返回的内容:CodehighlightingproducedbyActiproCodeHighlighter(freeware)http://www.CodeHighlighter.com/-->import httplibconn=httplib.HTTPConnection("www.cnblogs.com")conn.request("GET", "/coderzh/archive/2008/05/13/1194445.html")r=conn.getresponse()print r.read() #...
http://www.jb51.net//article/15713.htm
