摘要: 1 url = $url; 25 //通过调用get方法得到结果 26 $response = $t_client->get(); 27 28 //通过正则处理将需要的数据获取到 29 $pattern = ]*?class="js-title-link"[^>]*?>(.*?).*?#s 31 RE; 32 /... 阅读全文
posted @ 2016-05-26 22:54 意灵魔法馆 阅读(841) 评论(0) 推荐(0) 编辑
摘要: 说起狼这种动物,心里总有些害怕,可真正能让我佩服的是它们的分工合作,一群狼好像似乎在等待着些什么... 这时候有只狼缓缓的走来,看上去像是领头的。它好像在吩咐些什么,好像准备迎接战斗的样子。 另外一只狼好像并没有参与进来,领头的狼叫了几声根本没答应,反而趴在了一旁看着热闹,狼群散了,向不远处奔去,原 阅读全文
posted @ 2016-05-25 23:59 意灵魔法馆 阅读(1329) 评论(0) 推荐(0) 编辑
摘要: 'tangshuai', 'password' => 'tangshuai', 'captcha' => '' ); $data_str = http_build_query($data); $header[] = 'Accept:text/html'; $header[] = 'Accept-Language:zh-CN'; $header[] = 'Connection... 阅读全文
posted @ 2016-05-25 00:27 意灵魔法馆 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 昨天,手机还是好好的,今天就摔坏了。刚开始的时候,心里总是有些不愤,为什么自己不小心一些。可事情已经发生了,再有情绪有什么用! 今天不知道明天会发什么,甚至是在一下秒你也不知道会有什么来临。毕竟我们是平常人,没有那种预知未来的能力。所以在事情还未发生时赶紧去做吧!也许会少一些遗憾!这是血的教训啊,我 阅读全文
posted @ 2016-05-24 01:42 意灵魔法馆 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 1 "; 43 //var_dump($value); 44 45 46 //preg_match_all 匹配所有(多次)返回多维(二维)数组 通过这个可以抓取网页数据 47 //$pattern='/\w(\w)(\w)/'; 48 //$str='aTcd aH32g23cd a23g32bcd'; //aa bb cc 49 //$result=preg_... 阅读全文
posted @ 2016-05-23 00:57 意灵魔法馆 阅读(148) 评论(0) 推荐(0) 编辑
摘要: « HTML; $content_start=($pageNow-2)=$total_page?$total_page:$pageNow+2; $content_html=''; //遍历页码数 for($i=$content_start;$i $i HTML; } //尾页 ... 阅读全文
posted @ 2016-05-14 22:49 意灵魔法馆 阅读(172) 评论(0) 推荐(0) 编辑
摘要: _initArray($option); //初始化pdo $this->_initPdo(); } //定义一个单例模式 public static function getSingleton(array $option=array()){ if(!(self::$instance instanceof self)){ self... 阅读全文
posted @ 2016-05-12 23:52 意灵魔法馆 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 之前smarty已经初步介绍,下面是对于smarty的一个延伸 一、关于内置标签函数 1、include 语法:{include file="模板文件"} 案列说明: {include file="com/header.html"} <body></body> {include file="com/ 阅读全文
posted @ 2016-05-12 23:48 意灵魔法馆 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 什么是smarty?顾名思义聪明的意思,在网络上有很多说法,比如模板引擎,程序员与美工分离,界面与逻辑分开等等。如何使用? 引入smarty的核心文件(libs) 一、基本使用 1、开始实例化samrty对象 $samrty=new Smarty(); 2、分配数据 $smarty->assign( 阅读全文
posted @ 2016-05-11 00:07 意灵魔法馆 阅读(142) 评论(0) 推荐(0) 编辑
摘要: _initArray($option); $this->_initMysqli(); } private function __clone(){ } //定义一个单例模式 public static function getSingleton(array $option=array()){ if(!(self... 阅读全文
posted @ 2016-05-10 22:58 意灵魔法馆 阅读(468) 评论(0) 推荐(0) 编辑