上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 1 /** 2 * 3 * 实现思路:分页显示拆分 : 1...上页 12 13 14 15 [16] 17 18 19 20 ...100 下页 4 * 5 * function htmlPart1() : 上页 6 * function htmlPart2() : 1... 7 * function htmlPart3() : 12 13 14 15 [16] 17 18 19 20 8 * function htmlPart4() : ...100 9 * function htmlPart5() : 下页 10 * 11 * @param i... 阅读全文
posted @ 2014-02-28 18:52 再見理想 阅读(483) 评论(0) 推荐(0) 编辑
摘要: Js把URL中的参数解析为一个对象 阅读全文
posted @ 2014-02-28 18:43 再見理想 阅读(2003) 评论(0) 推荐(0) 编辑
摘要: 1 // 隐藏电话的中间四位 2 echo parseMobile('15836365252'); 3 function parseMobile($mobile, $start = 4, $len = 4){ 4 $firstLen = $start - 1; 5 $lastLen = 11 - $len - $firstLen; 6 $preg = '/(\d{'.$firstLen.'})(\d{'.$lastLen.'})/'; 7 return preg_replace($preg, '$1****$3', 阅读全文
posted @ 2014-02-28 18:31 再見理想 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1. 依次打开:Files => Settings => External Tools => +(add)2.填写信息:name:phpDoc; group:PHP插件; desc:php文档生成 Tools settings:Program: C:\wamp\bin\php\php5.3.13\phpdoc.batParameters: -d "E:\www.domain.com\Application\test" -t "E:\phpDocHtml\test" -o "HTML:frames:l0l33t"Wor 阅读全文
posted @ 2014-02-28 14:27 再見理想 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 一、修改httpd.conf1.启用apache的虚拟主机功能#LoadModulevhost_alias_modulemodules/mod_vhost_alias.so2.导入虚拟主机配置#Include conf/extra/httpd-vhosts.conf二、修改httpd-vhosts.confNameVirtualHost *:80 ServerName www.test.com ServerAlias test.test.com my.test.com DocumentRoot "D:/www" Order allow,deny ... 阅读全文
posted @ 2014-02-28 13:55 再見理想 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 1.安装Apache ,直接运行安装即可,我们将其安装到D:\PHP\Apache/目录下2.将PHP压缩包解压内容放到指定目录(例如:D:\PHP\Php5,将目录中的PHP.iniDevelopment重命名为php.ini)3.修改Apache配置文件(D:\PHP\Apache\conf\httpd.conf),以支持php模块 a. LoadModule php5_module "D:\PHP\PHP5\php5apache2_2.dll" b. application/x-httpd-php .php c. phpinidir:"D:/PHP/PHP5 阅读全文
posted @ 2014-02-26 12:39 再見理想 阅读(295) 评论(0) 推荐(0) 编辑
摘要: // 抽象基类 Userabstract class User{ protected $name = NULL; // 构造函数 function User($name){ $this->name = $name; } // 获取属性$name function getName(){ return $this->name; } // 浏览权限 function ViewAccess(){ return "No"; } // 编辑权限 function EditAccess(){ return "No"; } // 删除权限 function 阅读全文
posted @ 2014-02-21 19:50 再見理想 阅读(263) 评论(0) 推荐(0) 编辑
摘要: buy(123).PHP_EOL;echo $shop->sell(456).PHP_EOL;echo $shop->view(789).PHP_EOL.PHP_EOL;/** * -------------------------------------------------------------------------------- *//** * 抽象类:abstract * 其实抽象类和接口类有一部分很像,记得在哪里看见这样一句话,抽象类就把类 相似的部分抽出来, * 这句看上去很搞笑,其实它说出了抽象类的真理,抽象类的作用是,当你发现你的很多类里面用很多方法你不断的在 阅读全文
posted @ 2014-02-21 19:47 再見理想 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 1.什么是单例模式?作为对象的创建模式,单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统全局地提供这个实例。它不会创建实例副本,而是会向单例类内部存储的实例返回一个引用。2.单例模式的三个要点A.需要一个保存类的唯一实例的静态成员变量:private static $_instance;B.构造函数和克隆函数必须声明为私有的,防止外部程序new类从而失去单例模式的意义:private function __construct() {}private function __clone() { }C.必须提供一个访问这个实例的公共的静态方法(通常为getInstance方法),... 阅读全文
posted @ 2014-02-21 17:09 再見理想 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 数据结构:category(id, pid, name),对应:信息ID,父项ID,类别名测试数据:$aryCate = array( array('id' => 1, 'pid' => 0, 'name' => 'Level0'), array('id' => 2, 'pid' => 1, 'name' => 'Level0_1'), array('id' => 3, 'pid' => 阅读全文
posted @ 2014-02-21 14:56 再見理想 阅读(1196) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页