php文章摘要 [源程序]

 更新时间:2016年11月25日 16:12  点击:1644

// PHP 4.3 or above needed
define("BRIEF_LENGTH", 800);        //Word amount of the Briefing of an Article
function Generate_Brief($text){
    global $Briefing_Length;
    if(strlen($text) <= BRIEF_LENGTH ) return $text;    
    $Foremost = substr($text, 0, BRIEF_LENGTH);
    $re = "/<(\/?)(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|OBJECT|A|UL|OL|LI|BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT|SPAN)[^>]*(>?)/i";
    $Single = "/BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT/i";    
    
    $Stack = array(); $posStack = array();
    preg_match_all($re,$Foremost,$matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
    
    /*    [Child-matching Specification]:
        
        $matches[$i][1] : A "/" charactor indicating whether current "<...>" Friction is Closing Part
        $matches[$i][2] : Element Name.
        $matches[$i][3] : Right > of a "<...>" Friction    */
    for($i = 0 ; $i < count($matches); $i++){
        if($matches[$i][1][0] == ""){
            $Elem = $matches[$i][2][0];
            if(preg_match($Single,$Elem) && $matches[$i][3][0] !=""){
                continue;
            }
            array_push($Stack, strtoupper($matches[$i][2][0]));
            array_push($posStack, $matches[$i][2][1]);            
            if($matches[$i][3][0] =="") break;
        }else{
            $StackTop = $Stack[count($Stack)-1];
            $End = strtoupper($matches[$i][2][0]);
            if(strcasecmp($StackTop,$End)==0){
                array_pop($Stack);
                array_pop($posStack);
                if($matches[$i][3][0] ==""){
                    $Foremost = $Foremost.">";
                }
            }
        }        
    }
    $cutpos = array_shift($posStack) - 1;    
    $Foremost = substr($Foremost,0,$cutpos);
    return $Foremost;
};

#*********************************************************
#文件名称: function.php
#功能描述: 新闻添加修改处理模块
#程序制作:留印(adleyliu)
#联系qq  :14339095
#联系邮箱:[email=adleyliu@163.com]adleyliu@163.com[/email]
#官方网站: [url=http://www.115000.com.cn]http://www.115000.com.cn[/url]
#copyright (c) 2007-2008 115000.com.cn all rights reserved.
#最后更新:     2007-11-20
#*********************************************************


#*********************************************************
#分页函数
#*********************************************************
function yl_list_page($pageurl,$rsnum,$pages,$pagecount,$pagesize
){
#url
#总记录
#总页数
#当前页码
#每页显示数
   //$pageurl='?';
   
$pcount $pages
;
   
$page_info '<div class=pagenum>'
;
   
$page_info .= '<div class=num>'

   if ((
$pcount 1) && ($pcount == $pagecount
) ){
       
$page_info .= '<a href = '.$pageurl.'page='.intval($pagecount-1).'>上一页</a>'
;
   }elseif ((
$pagecount != 1) && ($pcount != $pagecount
)){
      
$page_info .= '<a href = '.$pageurl.'page='.intval($pagecount-1).'>上一页</a>'
;
   }
      
$page_info .= '<a href = '.$pageurl.'page=1>页首</a>'
;
   if (
$pagecount 4
){
     
$page_info .= '<a href = '.$pageurl.'page=1>[1]</a><span class=dot>...</span>'
;
   }
   if (
$pcount $pagecount+2
){
       
$endpage $pagecount+2
;
   }else{
     
$endpage $pcount
;
   }
   for (
$n = ($pagecount-2); $n <= $endpage$n
++){
      if (!(
$n 1
)){
         if (
$n == intval($pagecount
)){
         
$page_info .= '<span class=normal>'.$n.'</span>'
;
     }else{
        
$page_info .= '<a href = '.$pageurl.'page='.$n.'>['.$n.']</a>'
;
     }
      }
   }
   if (
$pagecount+$pcount
){
       
$page_info .= '<span class=dot>...</span><a href='.$pageurl.'page='.$pcount.'>['.$pcount.']</a>'
;
   }
       
$page_info .= '<a href = '.$pageurl.'page='.$pcount.'>页尾</a>'
;
   if ((
$pagecount == 1) && ($pcount != $pagecount) && ($pcount != 0
)){
       
$page_info .= '<a href = '.$pageurl.'page='.intval($pagecount 1).'>下一页</a>'
;
   }else if ((
$pagecount != 1) && ($pcount != $pagecount
)){
       
$page_info .= '<a href = '.$pageurl.'page='.intval($pagecount 1).'>下一页</a>'
;
   }
       
$page_info .= '</div></div>'
;
   
$page_info .= '<div class=pagenum>'
;
   
$page_info .= '<div class=num><span class=normal> 共:'.$rsnum .'条/'.$pcount.'页 每页/'.$pagesize.'条</span></div>'
;
   
$page_info .= ' <div class=num>'
;
   
//echo '<form name=page action='.$pageurl.'>';
   
$page_info .= ' 转到'
;
   
$page_info .= '<input type=text name=page value=\'1\' class=login_left style=\'width:28px;height:18px;\'>'
;
   
$page_info .= '页<input type=submit name=submit3 class=login_submit style=\'width:28px;height:18px;padding-top:1px;\' onclick=document.myform.action.value=\'go\'> '
;
   
//echo '</form>';
   
$page_info .= '</div>'
;
   
$page_info .= '</div>'
;
      return 
$page_info
;
}

正则表达式用于字符串处理、表单验证等场合,实用高效。现将一些常用的表达式收集于此,以备不时之需。

匹配中文字符的正则表达式: [\u4e00-\u9fa5]
评注:匹配中文还真是个头疼的事,有了这个表达式就好办了

匹配双字节字符正则表达式(包括汉字在内):[^\x00-\xff]
评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)

匹配空白行的正则表达式:\n\s*\r
评注:可以用来删除空白行

匹配HTML标记的正则表达式:<(\S*?)[^>]*>.*?</\1>|<.*? />
评注:网上流传的版本太糟糕,上面这个也仅仅能匹配部分,对于复杂的嵌套标记依旧无能为力

匹配首尾空白字符的正则表达式:^\s*|\s*$
评注:可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式

匹配Email地址的正则表达式:\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
评注:表单验证时很实用

匹配网址URL的正则表达式:[a-zA-z]+://[^\s]*
评注:网上流传的版本功能很有限,上面这个基本可以满足需求

匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$
评注:表单验证时很实用

匹配国内电话号码:\d{3}-\d{8}|\d{4}-\d{7}
评注:匹配形式如 0511-4405222 或 021-87888822

匹配腾讯QQ号:[1-9][0-9]{4,}
评注:腾讯QQ号从10000开始

匹配中国邮政编码:[1-9]\d{5}(?!\d)
评注:中国邮政编码为6位数字

匹配身份证:\d{15}|\d{18}
评注:中国的身份证为15位或18位

匹配ip地址正则表达式:\d+\.\d+\.\d+\.\d+
评注:提取ip地址时有用

匹配特定数字:
^[1-9]\d*$    //匹配正整数
^-[1-9]\d*$   //匹配负整数
^-?[1-9]\d*$   //匹配整数
^[1-9]\d*|0$  //匹配非负整数(正整数 + 0)
^-[1-9]\d*|0$   //匹配非正整数(负整数 + 0)
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$   //匹配正浮点数
^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$  //匹配负浮点数
^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$  //匹配浮点数
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$   //匹配非负浮点数(正浮点数 + 0)
^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$  //匹配非正浮点数(负浮点数 + 0)
评注:处理大量数据时有用,具体应用时注意修正

匹配特定字符串:
^[A-Za-z]+$  //匹配由26个英文字母组成的字符串
^[A-Z]+$  //匹配由26个英文字母的大写组成的字符串
^[a-z]+$  //匹配由26个英文字母的小写组成的字符串
^[A-Za-z0-9]+$  //匹配由数字和26个英文字母组成的字符串
^\w+$  //匹配由数字、26个英文字母或者下划线组成的字符串
评注:最基本也是最常用的一些表达式

mpmenu1=new mMenu('网站首页','/','self','','','','');
mpmenu1.addItem(new mMenuItem(' 用户注册','/register.asp','self',false,'用户注册',null,'','','',''));
mpmenu1.addItem(new mMenuItem(' 用户登录','/login.asp','self',false,'用户登录',null,'','','',''));
mpmenu1.addItem(new mMenuItem(' 用户退出','/login.asp?action=logout','self',false,'用户退出',null,'','','',''));
mpmenu1.addItem(new mMenuItem(' 资料修改','/bbs/MYMODIFY.ASP','self',false,'',null,'','','',''));
mpmenu2=new mMenu('软件下载','/SoftDown/','self','','','','');
mpmenu2.addItem(new mMenuItem(' 系统程序','/softdown/index.asp?CateID=1','self',false,'系统程序',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 网络工具','/softdown/index.asp?CateID=2','self',false,'网络工具',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 媒体工具','/softdown/index.asp?CateID=3','self',false,'媒体工具',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 图文处理','/softdown/index.asp?CateID=4','self',false,'图文处理',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 桌面工具','/softdown/index.asp?CateID=5','self',false,'桌面工具',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 程序代码','/softdown/index.asp?CateID=6','self',false,'程序代码',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 游戏娱乐','/softdown/index.asp?CateID=7','self',false,'游戏娱乐',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 其他工具','/softdown/index.asp?CateID=8','self',false,'其他工具',null,'','','',''));
mpmenu2.addItem(new mMenuItem(' 特别栏目','/softdown/index.asp?CateID=9','self',false,'特别栏目',null,'','','',''));
mpmenu2.addItem(new mMenuItem(null,null,null,true));
mpmenu2.addItem(new mMenuItem(' 下载排行','/SoftDown/Index.asp?order=AllHits&updown=desc','self',false,'软件下载排行榜',null,'','','',''));
mpmenu3=new mMenu('软件学院','/SoftSchool/','self','','','','');
mpmenu3.addItem(new mMenuItem(' 软件

function mwritetodocument(){
      var mwb=1;
                     var stringx='<div id="mposflag" style="position:absolute;"></div><table  id=mmenutable border=0 cellpadding=3 cellspacing=2 width='+mmenuwidth+' height='+mmenuheight+' bgcolor='+mmenucolor+
                     ' onselectstart="event.returnValue=false"'+
                     ' style="filter:Alpha(Opacity=80);cursor:'+mcursor+';'+mfonts+
                     ' border-left: '+mwb+'px solid '+mmenuoutbordercolor+';'+
                     ' border-right: '+mwb+'px solid '+mmenuinbordercolor+'; '+
                     'border-top: '+mwb+'px solid '+mmenuoutbordercolor+'; '+
                     'border-bottom: '+mwb+'px solid '+mmenuinbordercolor+'; padding:0px"><tr>'
                     for(var x=0;x<mmenus.length;x++){
                      var thismenu=mmenus[x];
                      var imgsize="";
                      if(thismenu.sizex!="0"||thismenu.sizey!="0")imgsize=" width="+thismenu.sizex+" height="+thismenu.sizey;
                      var ifspace="";
                      if(thismenu.caption!="")ifspace=" ";
                      stringx += "<td nowrap class=coolButton id=mMenu"+x+" style='border: "+mitemedge+"px solid "+mmenucolor+
                      "' width="+mmenuunitwidth+"px onmouseover=mmenu_over(mmenudiv"+x+
                      ","+x+") onmouseout=mmenu_out("+x+
                      ") onmousedown=mmenu_down(mmenudiv"+x+","+x+")";
                            if(thismenu.command!=""){
                                stringx += " onmouseup=mmenu_up();mexec2("+x+");";
                            }else{
                               stringx += " onmouseup=mmenu_up()";
                            }
                            if(thismenu.pos=="0"){
                                stringx += " align=center><img align=absmiddle src='"+thismenu.img+"'"+imgsize+">"+ifspace+thismenu.caption+"</td>";
                            }else if(thismenu.pos=="1"){
                                stringx += " align=center>"+thismenu.caption+ifspace+"<img align=absmiddle src='"+thismenu.img+"'"+imgsize+"></td>";
                            }else if(thismenu.pos=="2"){
                                stringx += " align=center background='"+thismenu.img+"'> "+thismenu.caption+" </td>";
                            }else{
                                stringx += " align=center> "+thismenu.caption+" </td>";
                            }
                      stringx += "";
                     }
                     stringx+="<td width=*> </td></tr></table>";
                    
                    
                     for(var x=0;x<mmenus.length;x++){
                      thismenu=mmenus[x];
                        if(x<0){
                        stringx+='<div id=mmenudiv'+x+' style="visiable:none"></div>';
                        }else{
                        stringx+='<div id=mmenudiv'+x+
                        ' style="filter:Alpha(Opacity=80);cursor:'+mcursor+';position:absolute;'+
                        'width:'+mmenuitemwidth+'px; z-index:'+(x+100);
                        if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                        stringx+=';border-left: 1px solid '+mmidoutcolor+
                        ';border-top: 1px solid '+mmidoutcolor;}
                        stringx+=';border-right: 1px solid '+mmenuinbordercolor+
                        ';border-bottom: 1px solid '+mmenuinbordercolor+';visibility:hidden" onselectstart="event.returnValue=false">\n'+
                      '<table  width="100%" border="0" height="100%" align="center" cellpadding="0" cellspacing="2" '+
                      'style="'+mfonts+' border-left: 1px solid '+mmenuoutbordercolor;
                      if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                      stringx+=';border-right: 1px solid '+mmidincolor+
                      ';border-bottom: 1px solid '+mmidincolor;}
                      stringx+=';border-top: 1px solid '+mmenuoutbordercolor+
                      ';padding: 4px" bgcolor='+mmenucolor+'>\n'
                      for(var i=0;i<thismenu.items.length;i++){
                       var thismenuitem=thismenu.items[i];
                       var imgsize="";
                              if(thismenuitem.sizex!="0"||thismenuitem.sizey!="0")imgsize=" width="+thismenuitem.sizex+" height="+thismenuitem.sizey;
                              var ifspace="";
                              if(thismenu.caption!="")ifspace=" ";
                       if(thismenuitem.hasc!=null){
                       stringx += "<tr><td id=mp"+thismenuitem.hasc+" class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                       "' width=100% onmouseout=mmenuitem_out(true) onmouseover=\"mmenuitem_over(mmenudiv"+x+
                       ",'"+thismenuitem.hasc+"',"+x+",-1,"+i+");mshowsubmenu(msubmenudiv"+thismenuitem.hasc+",mp"+thismenuitem.hasc+",mmenudiv"+x+");\""+
                       "><table id=mitem"+thismenuitem.hasc+" cellspacing='0' cellpadding='0' border='0' width='100%' style='"+mfonts+"'><tr><td ";
                         if(thismenuitem.pos=="0"){
                                  stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td><td";
                                }else if(thismenuitem.pos=="1"){
                                  stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td><td";
                                }else if(thismenuitem.pos=="2"){
                                  stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td><td background='"+thismenuitem.img+"'";
                                }else{
                                  stringx += ">"+thismenuitem.caption+"</td><td";
                                }
                         stringx += " align=right width='1'><font face='Webdings' style='font-size: 6pt'>4</font></td></tr></table></td></tr>\n";                      
                       }else if(!thismenuitem.isline){
                       stringx += "<tr><td class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                       "' width=100% height=15px onmouseover=\"mmenuitem_over(mmenudiv"+x+
                       ",false,"+x+",-1,"+i+");\" onmouseout=mmenuitem_out() onmousedown=mmenuitem_down() onmouseup=";
     stringx += "mmenuitem_up();mexec("+x+","+i+"); ";
       if(thismenuitem.pos=="0"){
                                  stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td></tr>";
                                }else if(thismenuitem.pos=="1"){
                                  stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td></tr>";
                                }else if(thismenuitem.pos=="2"){
                                  stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td></tr>";
                                }else{
                                  stringx += ">"+thismenuitem.caption+"</td></tr>";
                                }
     }else{
                       stringx+='<tr><td height="1" background="/images/hr.gif" onmousemove="clearTimeout(mpopTimer);"><img height="1" width="1" src="none.gif" border="0"></td></tr>\n';
                       }
                      }stringx+='</table>\n</div>'
                      }                     
                }
               
for(var j=1;j<=mnumberofsub;j++){    
thisitem=eval("msub"+j);
stringx+='<div id=msubmenudiv'+j+
                        ' style="filter:Alpha(Opacity=80);tag:'+thisitem.level+';cursor:'+mcursor+';position:absolute;'+
                        'width:'+mmenuitemwidth+'px; z-index:'+(j+200);
                        if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                        stringx+=';border-left: 1px solid '+mmidoutcolor+
                        ';border-top: 1px solid '+mmidoutcolor;}
                        stringx+=';border-right: 1px solid '+mmenuinbordercolor+
                        ';border-bottom: 1px solid '+mmenuinbordercolor+';visibility:hidden" onselectstart="event.returnValue=false">\n'+
                      '<table  width="100%" border="0" height="100%" align="center" cellpadding="0" cellspacing="2" '+
                      'style="'+mfonts+' border-left: 1px solid '+mmenuoutbordercolor;
                      if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                      stringx+=';border-right: 1px solid '+mmidincolor+
                      ';border-bottom: 1px solid '+mmidincolor;}
                      stringx+=';border-top: 1px solid '+mmenuoutbordercolor+
                      ';padding: 4px" bgcolor='+mmenucolor+'>\n'
                      for(var i=0;i<thisitem.items.length;i++){
                       var thismenuitem=thisitem.items[i];
                       var imgsize="";
                              if(thismenuitem.sizex!="0"||thismenuitem.sizey!="0")imgsize=" width="+thismenuitem.sizex+" height="+thismenuitem.sizey;
                              var ifspace="";
                              if(thismenu.caption!="")ifspace=" ";
                       if(thismenuitem.hasc!=null){
                       stringx += "<tr><td id=mp"+thismenuitem.hasc+" class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                       "' width=100% onmouseout=mmenuitem_out(true) onmouseover=\"mmenuitem_over(msubmenudiv"+j+
                       ",'"+thismenuitem.hasc+"',-1,"+j+","+i+");mshowsubmenu(msubmenudiv"+thismenuitem.hasc+",mp"+thismenuitem.hasc+",msubmenudiv"+j+");\""+
                       "><table id=mitem"+thismenuitem.hasc+" cellspacing='0' cellpadding='0' border='0' width='100%' style='"+mfonts+"'><tr><td ";
                         if(thismenuitem.pos=="0"){
                                  stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td><td";
                                }else if(thismenuitem.pos=="1"){
                                  stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td><td";
                                }else if(thismenuitem.pos=="2"){
                                  stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td><td background='"+thismenuitem.img+"'";
                                }else{
                                  stringx += ">"+thismenuitem.caption+"</td><td";
                                }
                         stringx += " align=right width='1'><font face='Webdings' style='font-size: 6pt'>4</font></td></tr></table></td></tr>\n";                      
                       }else if(!thismenuitem.isline){
                       stringx += "<tr><td class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                       "' width=100% height=15px onmouseover=\"mmenuitem_over(msubmenudiv"+j+
                       ",false,-1,"+j+","+i+");\" onmouseout=mmenuitem_out() onmousedown=mmenuitem_down() onmouseup=";
                       stringx += "mmenuitem_up();mexec3("+j+","+i+"); ";
     if(thismenuitem.pos=="0"){
                                  stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td></tr>";
                                }else if(thismenuitem.pos=="1"){
                                  stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td></tr>";
                                }else if(thismenuitem.pos=="2"){
                                  stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td></tr>";
                                }else{
                                  stringx += ">"+thismenuitem.caption+"</td></tr>";
                                }
                              }else{
                       stringx+='<tr><td height="1" background="/images/hr.gif" onmousemove="clearTimeout(mpopTimer);"><img height="1" width="1" src="none.gif" border="0"></td></tr>\n';
                       }
                      }
stringx+='</table>\n</div>'
}
       document.write("<div align='center' id='JsMenuCSS'>"+stringx+"</div>");
}

[!--infotagslink--]

相关文章

  • C#开发Windows窗体应用程序的简单操作步骤

    这篇文章主要介绍了C#开发Windows窗体应用程序的简单操作步骤,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-04-12
  • C++调用C#的DLL程序实现方法

    本文通过例子,讲述了C++调用C#的DLL程序的方法,作出了以下总结,下面就让我们一起来学习吧。...2020-06-25
  • 源码分析系列之json_encode()如何转化一个对象

    这篇文章主要介绍了源码分析系列之json_encode()如何转化一个对象,对json_encode()感兴趣的同学,可以参考下...2021-04-22
  • php中去除文字内容中所有html代码

    PHP去除html、css样式、js格式的方法很多,但发现,它们基本都有一个弊端:空格往往清除不了 经过不断的研究,最终找到了一个理想的去除html包括空格css样式、js 的PHP函数。...2013-08-02
  • C#使用Process类调用外部exe程序

    本文通过两个示例讲解了一下Process类调用外部应用程序的基本用法,并简单讲解了StartInfo属性,有需要的朋友可以参考一下。...2020-06-25
  • 微信小程序 页面传值详解

    这篇文章主要介绍了微信小程序 页面传值详解的相关资料,需要的朋友可以参考下...2017-03-13
  • 使用GruntJS构建Web程序之构建篇

    大概有如下步骤 新建项目Bejs 新建文件package.json 新建文件Gruntfile.js 命令行执行grunt任务 一、新建项目Bejs源码放在src下,该目录有两个js文件,selector.js和ajax.js。编译后代码放在dest,这个grunt会...2014-06-07
  • index.php怎么打开?如何打开index.php?

    index.php怎么打开?初学者可能不知道如何打开index.php,不会的同学可以参考一下本篇教程 打开编辑:右键->打开方式->经文本方式打开打开运行:首先你要有个支持运行PH...2017-07-06
  • uniapp微信小程序:key失效的解决方法

    这篇文章主要介绍了uniapp微信小程序:key失效的解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-01-20
  • 将c#编写的程序打包成应用程序的实现步骤分享(安装,卸载) 图文

    时常会写用c#一些程序,但如何将他们和photoshop一样的大型软件打成一个压缩包,以便于发布....2020-06-25
  • PHP常用的小程序代码段

    本文实例讲述了PHP常用的小程序代码段。分享给大家供大家参考,具体如下:1.计算两个时间的相差几天$startdate=strtotime("2009-12-09");$enddate=strtotime("2009-12-05");上面的php时间日期函数strtotime已经把字符串...2015-11-24
  • 微信小程序自定义tabbar组件

    这篇文章主要为大家详细介绍了微信小程序自定义tabbar组件,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2021-03-14
  • 微信小程序 网络请求(GET请求)详解

    这篇文章主要介绍了微信小程序 网络请求(GET请求)详解的相关资料,需要的朋友可以参考下...2016-11-22
  • PHP中func_get_args(),func_get_arg(),func_num_args()的区别

    复制代码 代码如下:<?php function jb51(){ print_r(func_get_args()); echo "<br>"; echo func_get_arg(1); echo "<br>"; echo func_num_args(); } jb51("www","j...2013-10-04
  • 微信小程序如何获取图片宽度与高度

    这篇文章主要给大家介绍了关于微信小程序如何获取图片宽度与高度的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-03-10
  • 微信小程序二维码生成工具 weapp-qrcode详解

    这篇文章主要介绍了微信小程序 二维码生成工具 weapp-qrcode详解,教大家如何在项目中引入weapp-qrcode.js文件,通过实例代码给大家介绍的非常详细,需要的朋友可以参考下...2021-10-23
  • PHP编程 SSO详细介绍及简单实例

    这篇文章主要介绍了PHP编程 SSO详细介绍及简单实例的相关资料,这里介绍了三种模式跨子域单点登陆、完全跨单点域登陆、站群共享身份认证,需要的朋友可以参考下...2017-01-25
  • Python爬取微信小程序通用方法代码实例详解

    这篇文章主要介绍了Python爬取微信小程序通用方法代码实例详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下...2020-09-29
  • 微信小程序(应用号)开发新闻客户端实例

    这篇文章主要介绍了微信小程序(应用号)开发新闻客户端实例的相关资料,需要的朋友可以参考下...2016-10-25
  • PHP实现创建以太坊钱包转账等功能

    这篇文章主要介绍了PHP实现创建以太坊钱包转账等功能,对以太坊感兴趣的同学,可以参考下...2021-04-20