首页
关于
友情链接
文章归档
Search
1
centos 32位 64位 下挂vagex一键包代码
719 阅读
2
wordpress转typecho方法
615 阅读
3
一个自制的virto精简版kvm qemu win2003模板 最低64M内存可用
605 阅读
4
PHP 安装
540 阅读
5
暴雨 车被泡了~
483 阅读
默认分类
vps综合利用
登录
/
注册
Search
标签搜索
Uncategorized
安装
mysql
utf-8
网站
google
linux
free
免费
黑色
ssl
一键包
优化
40%
press
vagex
32位
64位
debian
domain
御品VPS
累计撰写
501
篇文章
累计收到
1
条评论
首页
栏目
默认分类
vps综合利用
页面
关于
友情链接
文章归档
搜索到
37
篇与
index
的结果
2017-04-14
一段根据日期查询并把结果显示出来的代码
<? include "./sess.php"; include "./config.php"; $logined=$_SESSION["logined"]; if($logined!=1){ print "<center><font color=red size=8>你没有权限,请先从<a href=/>这里</a>进行登录 。</font></center>"; exit; }include "./sbl/config.php";if($_GET[startdate]==''){echo '起始日期为空,系统自动统计当天的数据';$_GET[startdate]=date("Ymd");}if($_GET[enddate]==''){echo '终止日期为空,系统自动统计当天的数据';$_GET[enddate]=date("Ymd"); }if ($_GET[enddate] > date("Ymd")) {echo '终止日期不能大于当前日期,系统自动统计到当天的数据';$_GET[enddate]=date("Ymd");}if ($_GET[startdate] > $_GET[enddate]) {echo '日期错误 终止日期必须大于或等于起始日期,系统自动统计当天的数据';$_GET[startdate]=date("Ymd");$_GET[enddate]=date("Ymd");}$timeb=time()+(3600*24*10);$dateb=date("Y-m-d",strtotime(date("$_GET[enddate]")." +10 day ")); if (!$conn) {exit("Connection Failed: " . $conn);}$sql0="select ....略;$sql1="select ...略 and a.enddate+1 between '$_GET[startdate]' and '$_GET[enddate]'group by 1, 2, 3, 4, 5into temp sbold with no log";$sql2="select b.*from sbold a, sbnew1 bwhere a.comcode=b.comcode...略 with no log";$sql3="select a.comcode[1,7],count(*) oldsl,sum(sumpremium) oldsumpremiumfrom sbold awhere 1=1group by 1into temp old with no log;select a.comcode[1,7],count(*) newsl,sum(sumpremium) newsumpremiumfrom sbnew awhere 1=1group by 1into temp new with no log";$sql4="select ....";//$rs0=odbc_exec($conn,$sql0);//$rs1=odbc_exec($conn,$sql1); //$rs2=odbc_exec($conn,$sql2);//$rs3=odbc_exec($conn,$sql3);$rs=odbc_exec($conn,$sql4);if (!$rs) {exit("Error in SQL");}if (file_exists("./sbl/test.txt")){unlink("./sbl/test.txt");}while (odbc_fetch_row($rs)){ $comcode=odbc_result($rs,"comcode"); $AppliName=odbc_result($rs,"oldsl"); $AppliCode=odbc_result($rs,"newsl"); $operatedate=odbc_result($rs,"sbl"); $OperatorCode=odbc_result($rs,"oldsumpremium"); $UnderwriteName=odbc_result($rs,"newsumpremium"); $content= "<tr><td class='style3'>$comcode</td><td class='style3'>$AppliName</td><td class='style3'>$AppliCode</td><td class='style3'>$operatedate</td><td class='style3'>$OperatorCode</td><td class='style3'>$UnderwriteName</td></tr>";file_put_contents('./sbl/test.txt',$content,FILE_APPEND);}$content=file_get_contents("./sbl/test.txt");$getcontent=ob_get_contents();echo "</table>";ob_clean();ob_start(); $title=统计时间: .$_GET[startdate]. 到 .$_GET[enddate];echo "$title \n"; //echo $dateb;$gettitle=ob_get_contents();//ob_clean();odbc_close($conn);$fp=fopen("./sbl/mb.htm","r"); $str=fread($fp,filesize("./sbl/mb.htm"));$str=str_replace("{content}",$content,$str); $str=str_replace("{title}",$title,$str); $handle=fopen("./sbl/index.htm","w+"); fwrite($handle,$str); fclose($handle);if (file_exists("./sbl/test.txt")){unlink("./sbl/test.txt");}echo "恭喜,数据报表已生成,<a href=./sbl/index.htm>点这里查看</a>";?>
2017年04月14日
126 阅读
0 评论
0 点赞
2017-04-14
一个日期录入选择代码
一个日期录入选择代码 如文件名为 inputdate.php<form method="get" action="../sqlcode.php" name="form1">请选择数据查询起始日期: <input name="startdate" readonly type="text" value="<? echo date("Y-m-01");?>" size="24" onFocus="CalendarWebControl.show(this,false,this.value);"><br><br>请选择数据查询终止日期:<input name="enddate" readonly type="text" value="<? echo date("Y-m-d");?>" size="24" onFocus="CalendarWebControl.show(this,false,this.value);"><input type="Submit" value="提 交" name="Submit" > </form> <script language="javascript"> function atCalendarControl(){ var calendar=this; this.calendarPad=null; this.prevMonth=null; this.nextMonth=null; this.prevYear=null; this.nextYear=null; this.goToday=null; this.calendarClose=null; this.calendarAbout=null; this.head=null; this.body=null; this.today=[]; this.currentDate=[]; this.sltDate; this.target; this.source;/************** 加入日历底板及阴影 *********************/ this.addCalendarPad=function(){ document.write("<div id='divCalendarpad' style='position:absolute;top:100;left:0;width:255;height:187;display:none;'>"); document.write("<iframe frameborder=0 height=189 width=250></iframe>"); document.write("<div style='position:absolute;top:2;left:2;width:250;height:187;background-color:#336699;'></div>"); document.write("</div>"); calendar.calendarPad=document.all.divCalendarpad; } /************** 加入日历面板 *********************/ this.addCalendarBoard=function(){ var BOARD=this; var divBoard=document.createElement("div"); calendar.calendarPad.insertAdjacentElement("beforeEnd",divBoard); divBoard.style.cssText="position:absolute;top:0;left:0;width:250;height:187;border:0 outset;background-color:buttonface;";var tbBoard=document.createElement("table"); divBoard.insertAdjacentElement("beforeEnd",tbBoard); tbBoard.style.cssText="position:absolute;top:2;left:2;width:248;height:10;font-size:9pt;"; tbBoard.cellPadding=0; tbBoard.cellSpacing=1;/************** 设置各功能按钮的功能 *********************/ /*********** Calendar About Button ***************/ trRow = tbBoard.insertRow(0); calendar.calendarAbout=calendar.insertTbCell(trRow,0,"?","center"); calendar.calendarAbout.title="帮助 快捷键:H"; calendar.calendarAbout.onclick=function(){calendar.about();} /*********** Calendar Head ***************/ tbCell=trRow.insertCell(1); tbCell.colSpan=5; tbCell.bgColor="#99CCFF"; tbCell.align="center"; tbCell.style.cssText = "cursor:default"; calendar.head=tbCell; /*********** Calendar Close Button ***************/ tbCell=trRow.insertCell(2); calendar.calendarClose = calendar.insertTbCell(trRow,2,"x","center"); calendar.calendarClose.title="关闭 快捷键:ESC或X"; calendar.calendarClose.onclick=function(){calendar.hide();}/*********** Calendar PrevYear Button ***************/ trRow = tbBoard.insertRow(1); calendar.prevYear = calendar.insertTbCell(trRow,0,"<<","center"); calendar.prevYear.title="上一年 快捷键:↑"; calendar.prevYear.onmousedown=function(){ calendar.currentDate[0]--; calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source); } /*********** Calendar PrevMonth Button ***************/ calendar.prevMonth = calendar.insertTbCell(trRow,1,"<","center"); calendar.prevMonth.title="上一月 快捷键:←"; calendar.prevMonth.onmousedown=function(){ calendar.currentDate[1]--; if(calendar.currentDate[1]==0){ calendar.currentDate[1]=12; calendar.currentDate[0]--; } calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source); } /*********** Calendar Today Button ***************/ calendar.goToday = calendar.insertTbCell(trRow,2,"今天","center",3); calendar.goToday.title="选择今天 快捷键:T"; calendar.goToday.onclick=function(){ if(calendar.returnTime) calendar.sltDate=calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2])+" "+calendar.formatTime(calendar.today[3])+":"+calendar.formatTime(calendar.today[4]) else calendar.sltDate=calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2]); calendar.target.value=calendar.sltDate; calendar.hide(); //calendar.show(calendar.target,calendar.today[0]+"-"+calendar.today[1]+"-"+calendar.today[2],calendar.source); } /*********** Calendar NextMonth Button ***************/ calendar.nextMonth = calendar.insertTbCell(trRow,3,">","center"); calendar.nextMonth.title="下一月 快捷键:→"; calendar.nextMonth.onmousedown=function(){ calendar.currentDate[1]++; if(calendar.currentDate[1]==13){ calendar.currentDate[1]=1; calendar.currentDate[0]++; } calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source); } /*********** Calendar NextYear Button ***************/ calendar.nextYear = calendar.insertTbCell(trRow,4,">>","center"); calendar.nextYear.title="下一年 快捷键:↓"; calendar.nextYear.onmousedown=function(){ calendar.currentDate[0]++; calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source);}trRow = tbBoard.insertRow(2); var cnDateName = new Array("日","一","二","三","四","五","六"); for (var i = 0; i < 7; i++) { tbCell=trRow.insertCell(i) tbCell.innerText=cnDateName[i]; tbCell.align="center"; tbCell.width=35; tbCell.style.cssText="cursor:default;border:1 solid #99CCCC;background-color:#99CCCC;"; }/*********** Calendar Body ***************/ trRow = tbBoard.insertRow(3); tbCell=trRow.insertCell(0); tbCell.colSpan=7; tbCell.height=97; tbCell.vAlign="top"; tbCell.bgColor="#F0F0F0";var tbBody=document.createElement("table"); tbCell.insertAdjacentElement("beforeEnd",tbBody); tbBody.style.cssText="position:relative;top:0;left:0;width:245;height:103;font-size:9pt;" tbBody.cellPadding=0; tbBody.cellSpacing=1; calendar.body=tbBody;/*********** Time Body ***************/ trRow = tbBoard.insertRow(4); tbCell=trRow.insertCell(0); calendar.prevHours = calendar.insertTbCell(trRow,0,"-","center"); calendar.prevHours.title="小时调整 快捷键:Home"; calendar.prevHours.onmousedown=function(){ calendar.currentDate[3]--; if(calendar.currentDate[3]==-1) calendar.currentDate[3]=23; calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4]); } tbCell=trRow.insertCell(1); calendar.nextHours = calendar.insertTbCell(trRow,1,"+","center"); calendar.nextHours.title="小时调整 快捷键:End"; calendar.nextHours.onmousedown=function(){ calendar.currentDate[3]++; if(calendar.currentDate[3]==24) calendar.currentDate[3]=0; calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4]); } tbCell=trRow.insertCell(2); tbCell.colSpan=3; tbCell.bgColor="#99CCFF"; tbCell.align="center"; tbCell.style.cssText = "cursor:default"; calendar.bottom=tbCell; tbCell=trRow.insertCell(3); calendar.prevMinutes = calendar.insertTbCell(trRow,3,"-","center"); calendar.prevMinutes.title="分钟调整 快捷键:PageUp"; calendar.prevMinutes.onmousedown=function(){ calendar.currentDate[4]--; if(calendar.currentDate[4]==-1) calendar.currentDate[4]=59; calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4]); } tbCell=trRow.insertCell(4); calendar.nextMinutes = calendar.insertTbCell(trRow,4,"+","center"); calendar.nextMinutes.title="分钟调整 快捷键:PageDown"; calendar.nextMinutes.onmousedown=function(){ calendar.currentDate[4]++; if(calendar.currentDate[4]==60) calendar.currentDate[4]=0; calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4]); }}/************** 加入功能按钮公共样式 http://www.bk163.net*********************/ this.insertTbCell=function(trRow,cellIndex,TXT,trAlign,tbColSpan){ var tbCell=trRow.insertCell(cellIndex); if(tbColSpan!=undefined) tbCell.colSpan=tbColSpan;var btnCell=document.createElement("button"); tbCell.insertAdjacentElement("beforeEnd",btnCell); btnCell.value=TXT; btnCell.style.cssText="width:100%;border:1 outset;background-color:buttonface;"; btnCell.onmouseover=function(){ btnCell.style.cssText="width:100%;border:1 outset;background-color:#F0F0F0;";} btnCell.onmouseout=function(){ btnCell.style.cssText="width:100%;border:1 outset;background-color:buttonface;"; } // btnCell.onmousedown=function(){ // btnCell.style.cssText="width:100%;border:1 inset;background-color:#F0F0F0;"; // } btnCell.onmouseup=function(){ btnCell.style.cssText="width:100%;border:1 outset;background-color:#F0F0F0;"; } btnCell.onclick=function(){ btnCell.blur(); } return btnCell; }this.setDefaultDate=function(){ var dftDate=new Date(); calendar.today[0]=dftDate.getYear(); calendar.today[1]=dftDate.getMonth()+1; calendar.today[2]=dftDate.getDate(); calendar.today[3]=dftDate.getHours(); calendar.today[4]=dftDate.getMinutes(); }/****************** Show Calendar *********************/ this.show=function(targetObject,returnTime,defaultDate,sourceObject){ if(targetObject==undefined) { alert("未设置目标对象. \n方法: ATCALENDAR.show(obj 目标对象,boolean 是否返回时间,string 默认日期,obj 点击对象);\n\n目标对象:接受日期返回值的对象.\n默认日期:格式为\"yyyy-mm-dd\",缺省为当前日期.\n点击对象:点击这个对象弹出calendar,默认为目标对象.\n"); return false; } else calendar.target=targetObject;if(sourceObject==undefined) calendar.source=calendar.target; else calendar.source=sourceObject;if(returnTime) calendar.returnTime=true; else calendar.returnTime=false;var firstDay; var Cells=new Array(); if((defaultDate==undefined) || (defaultDate=="")){ var theDate=new Array(); calendar.head.innerText = calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2]); calendar.bottom.innerText = calendar.formatTime(calendar.today[3])+":"+calendar.formatTime(calendar.today[4]);theDate[0]=calendar.today[0]; theDate[1]=calendar.today[1]; theDate[2]=calendar.today[2]; theDate[3]=calendar.today[3]; theDate[4]=calendar.today[4]; } else{ var Datereg=/^\d{4}-\d{1,2}-\d{2}$/ var DateTimereg=/^(\d{1,4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/ if((!defaultDate.match(Datereg)) && (!defaultDate.match(DateTimereg))){ alert("默认日期(时间)的格式不正确!\t\n\n默认可接受格式为:\n1、yyyy-mm-dd \n2、yyyy-mm-dd hh:mm\n3、(空)"); calendar.setDefaultDate(); return; }if(defaultDate.match(Datereg)) defaultDate=defaultDate+" "+calendar.today[3]+":"+calendar.today[4]; var strDateTime=defaultDate.match(DateTimereg); var theDate=new Array(4) theDate[0]=strDateTime[1]; theDate[1]=strDateTime[2]; theDate[2]=strDateTime[3]; theDate[3]=strDateTime[4]; theDate[4]=strDateTime[5]; calendar.head.innerText = theDate[0]+"-"+calendar.formatTime(theDate[1])+"-"+calendar.formatTime(theDate[2]); calendar.bottom.innerText = calendar.formatTime(theDate[3])+":"+calendar.formatTime(theDate[4]); } calendar.currentDate[0]=theDate[0]; calendar.currentDate[1]=theDate[1]; calendar.currentDate[2]=theDate[2]; calendar.currentDate[3]=theDate[3]; calendar.currentDate[4]=theDate[4];theFirstDay=calendar.getFirstDay(theDate[0],theDate[1]); theMonthLen=theFirstDay+calendar.getMonthLen(theDate[0],theDate[1]); //calendar.setEventKey();calendar.calendarPad.style.display=""; var theRows = Math.ceil((theMonthLen)/7); //清除旧的日历; while (calendar.body.rows.length > 0) { calendar.body.deleteRow(0) } //建立新的日历; var n=0;day=0; for(i=0;i<theRows;i++){ theRow=calendar.body.insertRow(i); for(j=0;j<7;j++){ n++; if(n>theFirstDay && n<=theMonthLen){ day=n-theFirstDay; calendar.insertBodyCell(theRow,j,day); }else{ var theCell=theRow.insertCell(j); theCell.style.cssText="background-color:#F0F0F0;cursor:default;"; } } }//****************调整日历位置**************// var offsetPos=calendar.getAbsolutePos(calendar.source);//计算对象的位置; if((document.body.offsetHeight-(offsetPos.y+calendar.source.offsetHeight-document.body.scrollTop))<calendar.calendarPad.style.pixelHeight){ var calTop=offsetPos.y-calendar.calendarPad.style.pixelHeight; } else{ var calTop=offsetPos.y+calendar.source.offsetHeight; } if((document.body.offsetWidth-(offsetPos.x+calendar.source.offsetWidth-document.body.scrollLeft))>calendar.calendarPad.style.pixelWidth){ var calLeft=offsetPos.x; } else{ var calLeft=calendar.source.offsetLeft+calendar.source.offsetWidth; } //alert(offsetPos.x); calendar.calendarPad.style.pixelLeft=calLeft; calendar.calendarPad.style.pixelTop=calTop; } /****************** 计算对象的位置 *************************/ this.getAbsolutePos = function(el) { var r = { x: el.offsetLeft, y: el.offsetTop }; if (el.offsetParent) { var tmp = calendar.getAbsolutePos(el.offsetParent); r.x += tmp.x; r.y += tmp.y; } return r; };//************* 插入日期单元格 **************/ this.insertBodyCell=function(theRow,j,day,targetObject){ var theCell=theRow.insertCell(j); if(j==0) var theBgColor="#FF9999"; else var theBgColor="#FFFFFF"; if(day==calendar.currentDate[2]) var theBgColor="#CCCCCC"; if(day==calendar.today[2]) var theBgColor="#99FFCC"; theCell.bgColor=theBgColor; theCell.innerText=day; theCell.align="center"; theCell.width=35; theCell.style.cssText="border:1 solid #CCCCCC;cursor:hand;"; theCell.onmouseover=function(){ theCell.bgColor="#FFFFCC"; theCell.style.cssText="border:1 outset;cursor:hand;"; } theCell.onmouseout=function(){ theCell.bgColor=theBgColor; theCell.style.cssText="border:1 solid #CCCCCC;cursor:hand;"; } theCell.onmousedown=function(){ theCell.bgColor="#FFFFCC"; theCell.style.cssText="border:1 inset;cursor:hand;"; } theCell.onclick=function(){ if(calendar.returnTime) calendar.sltDate=calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(day)+" "+calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4]) else calendar.sltDate=calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(day); calendar.target.value=calendar.sltDate; calendar.hide(); } } /************** 取得月份的第一天为星期几 *********************/ this.getFirstDay=function(theYear, theMonth){ var firstDate = new Date(theYear,theMonth-1,1); return firstDate.getDay(); } /************** 取得月份共有几天 *********************/this.getMonthLen=function(theYear, theMonth) { theMonth--; var oneDay = 1000 * 60 * 60 * 24; var thisMonth = new Date(theYear, theMonth, 1); var nextMonth = new Date(theYear, theMonth + 1, 1); var len = Math.ceil((nextMonth.getTime() - thisMonth.getTime())/oneDay); return len; } /************** 隐藏日历 *********************/ this.hide=function(){ //calendar.clearEventKey(); calendar.calendarPad.style.display="none";} /************** 从这里开始 *********************/ this.setup=function(defaultDate){ calendar.addCalendarPad(); calendar.addCalendarBoard(); calendar.setDefaultDate(); } /************** 格式化时间 *********************/ this.formatTime = function(str) { str = ("00"+str); return str.substr(str.length-2); }/************** 关于AgetimeCalendar *********************/ this.about=function(){ var strAbout = "\nWeb 日历选择输入控件操作说明:\n\n"; strAbout+="?\t: 关于\n"; strAbout+="x\t: 隐藏\n"; strAbout+="<<\t: 上一年\n"; strAbout+="<\t: 上一月\n";strAbout+="今日\t: 返回当天日期\n"; strAbout+=">\t: 下一月\n"; strAbout+="<<\t: 下一年\n"; strAbout+="\n数据查询日期选择器\t Ver:v1.0\t\n \t\t2010.11.01\t\n"; alert(strAbout); }document.onkeydown=function(){ if(calendar.calendarPad.style.display=="none"){ window.event.returnValue= true; return true ; } switch(window.event.keyCode){ case 27 : calendar.hide(); break; //ESC case 37 : calendar.prevMonth.onmousedown(); break;//← case 38 : calendar.prevYear.onmousedown();break; //↑ case 39 : calendar.nextMonth.onmousedown(); break;//→ case 40 : calendar.nextYear.onmousedown(); break;//↓ case 84 : calendar.goToday.onclick(); break;//T case 88 : calendar.hide(); break; //X case 72 : calendar.about(); break; //H case 36 : calendar.prevHours.onmousedown(); break;//Home case 35 : calendar.nextHours.onmousedown(); break;//End case 33 : calendar.prevMinutes.onmousedown();break; //PageUp case 34 : calendar.nextMinutes.onmousedown(); break;//PageDown } window.event.keyCode = 0; window.event.returnValue= false; }calendar.setup(); } var CalendarWebControl = new atCalendarControl(); </script>
2017年04月14日
122 阅读
0 评论
0 点赞
2017-03-28
申请西部数码1年免费TrustAsia DV SSL证书 附申请图文过程
如今,越来越多的网站需要用到SSL证书,尤其是一些用户交互的网站肯定是需要使用到的,因为前几天在升级火狐浏览器后发现没有使用HTTPS网址的网站在注册和登入账户的时候会有安全提醒。如果是单一的内容型网站,暂时不用SSL也是可以的,以后不懂是否一定所有的网站都需要用到。对于我们普通的个人网站,或者只要简单的实现HTTPS效果的,那我们可以找找免费的SSL证书提供商(虽然付费的也不是很贵),比如我们可能熟悉的Let's Encrypt免费SSL证书部署起来也不是很难,而且如今很多国内的IDC商家也都有陆续提供免费SSL服务,比如今天老左有看到的西部数码也有提供免费TrustAsiaDV SSL证书一年。在这篇文章中,老左就准备简单体验下西部数码提供的免费TrustAsia DV SSL证书申请过程,看看是否容易,如果可行至少我们又多了一个选择渠道。第一、西部数码免费SSL申请地址 申请地址:http://www.west.cn/web/ssl/default/index 前提是我们需要有一个西部数码账户,注册账户我就不演示了,我有账户的,就直接登入。第二、西部数码免费SSL申请图文1、选择免费SSL证书这里有三种类型,我们是需要用免费的,所以选择TrustAsia,域名型DV是免费的。直接提交订单就可以。2、补全资料我们下单之后,会看到免费SSL已经在已购证书列表里了,但是需要我们补全信息。这个稍微比较复杂一点 ,但是也不用奇怪,国内的注册商都需要提交信息的,因为我是需要确保能正常批下,所以我还是用了真实信息。(账户我都认证注册了,这里填写虚假也没有必要)这里需要设置证书下载密码,以后下载证书需要用到,所以不要乱写。3、验证类型这里选择我们可以验证域名所有权的类型。如果我们当前有站点在做,那可以用文件验证,如果还没站点先申请,那就用DNS验证。第三、西部数码免费SSL证书审核过程1、我们在第二步提交之后,开始是进入"订单已完善,等待提交上级"状态。然后我们点击下面按钮提交。2、域名所有权验证这里我们就需要去域名面板修改记录解析,验证域名所有权。这里,我们在域名验证记录修改后,我觉得这个方法简单,如果是文件验证还要弄个站点挂文件。解析完成之后,大约等了3分钟左右时间,就收到通过邮件。第四、免费SSL证书申请完成审核还是蛮快的,审核完毕之后,我们点击详情就可以下载证书,点击下载 后需要输入我们当初设置的下载密码。这里我们需要选择下载证书格式,是用到哪里的就选择对应的环境。将下载的.ZIP压缩包解压,后面我们就可以根据需要的环境配置到网站中。 本文固定链接: http://www.laozuo.org/10285.html | 老左博客
2017年03月28日
227 阅读
0 评论
0 点赞
2017-03-28
6个免费SSL证书申请 节省成本配置网站HTTPS加密网址
以前,如果我们需要将网站配置SSL证书,其成本还是蛮高的,主要是商家还没有普及提供,而如今无论是付费的还是免费SSL证书都相当的普及。我们应该知道沃通免费SSL证书(目前不免费)、StartSSL、Let's Encrypt,以及当前国内的很多IDC商家都有提供的赛门铁克 DV SSL证书都是免费的。不过一直以来关于赛门铁克SSL证书与Chrome兼容争议不断,如果Chrome废除所有Symantec证书支持,其实对于网站还是蛮有影响的,尤其是海外网站用户量还是比较大的。具体的还没有定论,我们可以关注事态发展,如果项目比较重要,建议还是用付费SSL证书。在这篇文章中,老左整理目前看到的一些免费SSL证书,如果有需要降低成本配置网站HTTPS加密的,可以选择使用。第一、Let's Encrypt 官方网站:https://letsencrypt.org/ Let's Encrypt免费SSL证书的支持/赞助商还是比较多的,其中也包括Chrome,难道其和Symantec的争议是为了普及和推广使用Let's Encrypt?虽然Let's Encrypt没有类似一些免费商家提供免费1-3年/次,只是周期免费90天,我们需要设置自动或者提前续约才可以继续使用。第二、StartSSL 官网网站:https://www.startssl.com/ StartSSL免费SSL证书提供也有一段时间了,以前我记得也有尝试申请过。刚才去官方看到提供3年免费SSL服务,但是看到一些文章有提到StartSSL在火狐浏览器中不信任的问题。如果我们在使用的时候发现与浏览器不兼容信任,那还是选择其他的吧。第三、阿里云Symantec DV SSL 官网地址:https://www.aliyun.com/product/cas 免费DV SSL证书,一次申请每个域名1年,每个阿里账户可以签发20张免费证书。单个域名、二级域名,单独申请是分开算的。第四、腾讯云DV SSL证书 官网地址:https://console.qcloud.com/ssl 同样的,也提供免费一年DV SSL证书,申请还算是简单的,只要验证域名所有权就可以申请通过。第五、西部数码免费SSL 申请地址:http://www.west.cn/web/ssl/default/index 免费一年域名型DV SSL证书,老左之前尝试申请过(这里),提交后基本上5分钟之内就可以得到下放证书。第六、景安免费DV SSL证书 申请地址:http://www.zzidc.com/main/huodong/freessl.html 每个景安账户可以申请3个免费DV SSL证书,老左以前好像看到还需要预约才可以下放资格的,现在好像直接可以免费提交购物车下单申请验证。毕竟大部分国内的IDC商家都免费提供。总结,我们可以看到当前提供免费SSL证书的商家和服务还是比较多的,从兼容和支持看,我们得考虑到所有的浏览器支持,个人觉得免费的还是Let's Encrypt好一些,但是对于一般用户的申请可能稍微比其他几个国内的商家申请验证复杂一点。如果有条件的朋友还是购买付费证书,以后整理一篇文章看看几个主流商家提供付费SSL证书的价格对比,如果有网友在使用付费SSL证书,烦请留言告知哪些还是不错的,性价比还可以接受的。 本文固定链接: http://www.laozuo.org/10326.html | 老左博客
2017年03月28日
201 阅读
0 评论
0 点赞
2013-07-04
关于网站乱问题 已解决
关于网站乱问题 已解决在国外空间上刚安装了这个系统 发现默认的不是utf-8编码 虽然在页面已加了 <head><meta http-equiv="Content-type" content="text/html; charset=utf-8"></head>如是自己服务器或vps ,可试修改http.conf中的AddDefaultCharset为AddDefaultCharset off 或 utf-8,关闭apache默认编码但仍然是乱码,经多次测试 ,作为一般权限的空间 ,只要在index.php首页顶部增加一行 就可以了 header('Content-Type: text/html; charset=UTF-8'); 就是这一行关于网站乱问题 已解决 如何强制页面使用utf-8编码解析 解决方法
2013年07月04日
144 阅读
0 评论
0 点赞
1
...
6
7
8