上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页

2013年5月13日

php使用strstr函数 ,判断字符串A中是否含有字符串B

摘要: <?php//例如:字符串A $a= “中华人民wan sui wan sui wan wan sui!”; //想知道这个字符串中是否含有 中华 或者 wan sui//可以作如下判断$a = "中华人民wan sui wan sui wan wan sui!";if(strstr($a,"中华") && strstr($a,"wan sui")){echo "<br />字符串A中含有中华和wan sui";}?> 阅读全文

posted @ 2013-05-13 16:27 风林幻海 阅读(381) 评论(0) 推荐(0) 编辑

2013年5月9日

php分页

摘要: SubPages.php<?php /*** php分页类代码*/header("Content-Type: text/html; charset=utf-8");class SubPages{ private $each_disNums;//每页显示的条目数 private $nums;//总条目数 private $current_page;//当前被选中的页 private $sub_pages;//每次显示的页数 private $pageNums;//总页数 private $page_array = array();//用来构造分页的... 阅读全文

posted @ 2013-05-09 14:25 风林幻海 阅读(220) 评论(0) 推荐(0) 编辑

js与php互传参数

摘要: function setCookie (name, value) { //设置名称为name,值为value的Cookie var expdate = new Date(); //初始化时间 expdate.setTime(expdate.getTime() + 30 * 60 * 1000); //时间 document.cookie = name+"="+value+";expires="+expdate.toGMTString()+";path=/"; //即document.cookie= name+"=" 阅读全文

posted @ 2013-05-09 11:27 风林幻海 阅读(379) 评论(0) 推荐(0) 编辑

2013年5月8日

Ubuntu 12.04下载址

摘要: http://releases.ubuntu.com/12.04/ 阅读全文

posted @ 2013-05-08 23:17 风林幻海 阅读(150) 评论(0) 推荐(0) 编辑

[转]PHP页面间参数传递的四种方式

摘要: 出处:http://blog.csdn.net/chentingpc/article/details/7075134我们定义page01.php和page02.php两个php文件,将page01中的内容想办法传递到page02,然后供我们继续使用。第一种:使用客户端浏览器的cookie。cookie很容易理解,就是一个临时文件,可以把它看成一个储藏室,浏览器在浏览的过程中记录一些信息,就暂时存放在这里。在page01中设置一个cookie。就是这么简单,我们已经创建cookie完毕。我们定义了一个变量mycookie,它的值是字符串'自灵'。我们可以随便给cookie变量起名 阅读全文

posted @ 2013-05-08 15:29 风林幻海 阅读(200) 评论(0) 推荐(0) 编辑

php操作json小结

摘要: Javascript 中可以用{}表示一个对象,用[]表示一个数组,如:var obj={"a":"v","b":"x"};//这表示变量obj是一个对象,它有两个属性:a和b,属性值分别是:v和x.var arr=["v","x"];//这表示变量arr是一个数组,它有两一元素,索引分别是0和1,值分别是:v和x.JSON其实就是这两种格式混合在一起来表示数据的逻辑结构的格式,其实JSON就是Javascript中对象和数组的混合体PHP提供的专门的函数来生成和解析JSON 阅读全文

posted @ 2013-05-08 11:37 风林幻海 阅读(232) 评论(0) 推荐(0) 编辑

2013年5月4日

ubuntu php访问带apache2基本认证的页面

摘要: web服务器系统 Ubuntu 12.04安装curl库查找php5的curl支持库apt-cache search curl | grep php得到 php5-curl - CURL module for php5apt-get install curl php5-curl<?phpheader("Content-Type: text/html; charset=utf-8");$host = '10.0.1.191'; //主机 $path = '/itmng/cgi-bin/showlog.cgi?jsonoutput'; // 阅读全文

posted @ 2013-05-04 11:12 风林幻海 阅读(235) 评论(0) 推荐(0) 编辑

2013年4月30日

JS获取表格行数和列数

摘要: var tab = document.getElementById("TBODY_TABLE");//表格总行数(隐藏+显示) var rows = tab.rows.length ;//表格总列数 var cells = tab.rows.item(0).cells.length ;var x=0; for (i=0;i<rows;i++){ if (tab.rows[i].style.display=="none") { x = x + 1; }} //alert("表TBODY_TABLE隐藏的行数:" + x + &qu 阅读全文

posted @ 2013-04-30 15:24 风林幻海 阅读(1678) 评论(0) 推荐(0) 编辑

ASP导出Excel

摘要: <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equtv="Content-Type" content="text/html; charset=gb2312" /></head><% Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", &q 阅读全文

posted @ 2013-04-30 11:01 风林幻海 阅读(124) 评论(0) 推荐(0) 编辑

php导出Excel

摘要: <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /></head><?phpheader("Content-type: application/octet-stream");header("Accept-Ranges: bytes");header(" 阅读全文

posted @ 2013-04-30 10:53 风林幻海 阅读(217) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页

导航