随笔分类 -  PHP

CodeIgniter剖析(1)
摘要:下载CodeIgniter1.7并解压缩后,将index.php和system目录拷贝到web服务器的根目录下,这样就完成了CodeIgniter的安装。 安装完后可以看下system目录下的结构。Application是你自己项目存放文件的目录(简单来说,控制器,模型和视图都在这里)。System目录下其他文件夹是CodeIgniter自身的代码,比较常用的有libraries等。 要建立一个网站,一些常用的配置是首先需要做的.config文件夹中包含了一些为网站设定基本配置的文件,打开 config.php,可以看到有许多配置项,例如 $config['base_url' 阅读全文

posted @ 2011-02-11 11:14 Phinecos(洞庭散人) 阅读(2042) 评论(0) 推荐(0) 编辑

每日学习笔记(11)
摘要:1,php中反射API应用的一个实例代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?phpclassPerson{public$name;function__construct($name){$this->name=$name;}}... 阅读全文

posted @ 2010-09-30 11:38 Phinecos(洞庭散人) 阅读(889) 评论(0) 推荐(0) 编辑

每日学习笔记(10)
摘要:记录下自己日常工作中经常使用的几个小工具类1,python部分,一个日志类,一个数据库操作类。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--####################日志辅助类#################classLogger... 阅读全文

posted @ 2010-09-28 10:10 Phinecos(洞庭散人) 阅读(1081) 评论(0) 推荐(0) 编辑

每日学习笔记(9)
摘要:1,PHP的回调函数是一个很有用的语法,可以将业务对象与附加其上的处理逻辑隔离开来,这也是观察者模式的一种实现。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?phpclassProduct{public$name;publicfunct... 阅读全文

posted @ 2010-09-27 11:01 Phinecos(洞庭散人) 阅读(591) 评论(0) 推荐(0) 编辑

每日学习笔记(8)
摘要:1,PHP5.3中引入了一个名为"延期静态绑定(late staticbinding)"的概念,这个概念和多态结合起来的一个有趣的例子如下代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--abstractclassBaseObject{publics... 阅读全文

posted @ 2010-09-26 17:48 Phinecos(洞庭散人) 阅读(573) 评论(0) 推荐(0) 编辑

每日学习笔记(6)
摘要:今天在做的事情是将一个as3项目的部分代码移植到PHP中来,记录下移植过程中遇到的两个问题。1,AS3中String类的charCodeAt函数是返回字符的unicode编码,而在PHP中并没有直接与之对应的库函数,可以用下面这个函数做替代:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.Co... 阅读全文

posted @ 2010-07-08 19:08 Phinecos(洞庭散人) 阅读(931) 评论(0) 推荐(0) 编辑

《Head First设计模式》读书笔记(二)
摘要:对于观察者模式,PHP通过标准PHP库(SPL)提供了内建的支持,下面用SPL对昨天的观察者模式示例进行修改。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?phpclassWeatherDataimplementsSplSubject{... 阅读全文

posted @ 2010-07-07 10:05 Phinecos(洞庭散人) 阅读(743) 评论(0) 推荐(0) 编辑

《Head First设计模式》读书笔记(一)
摘要:用php来实现书中的示例和习题,昨天完成策略模式和观察者模式,代码如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?phpinterfaceFlyBehavior{functionfly();}interfaceQuackBehavi... 阅读全文

posted @ 2010-07-06 09:15 Phinecos(洞庭散人) 阅读(979) 评论(0) 推荐(0) 编辑

AMFPHP快速入门
摘要:AMFPHP是PHP的远程调用(RPC, Remote ProcedureCall)工具。它可以使PHP与下述技术无缝通信:(1) Flash 和 Flex Remoting(2) JavaScript JSON 和 Ajax JSON(3) XML 和XML-RPC什么是RPC远端程序调用(RPC, Remote ProcedureCall) 是一种客户端与服务器端交换数据方式。我们可以调用本地... 阅读全文

posted @ 2010-05-10 11:12 Phinecos(洞庭散人) 阅读(1845) 评论(0) 推荐(0) 编辑

每日学习笔记(2)
摘要:1,使用python提交post请求时,如果参数中包含中文,则会提交失败,因此需要将参数进行utf-8编码,示例如下:[代码]2,一直在linux下使用python2.4,习惯了print 'hello'这样的写法,今天换到windows下,并且安装了python3.1后发现print是一个函数,因此要写成print('hello'),悲剧,但目前项目中都还是用的老旧的语法,还是得继续2.4才好。... 阅读全文

posted @ 2010-04-28 20:31 Phinecos(洞庭散人) 阅读(708) 评论(0) 推荐(0) 编辑

BMH子串查找算法(PHP实现)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--interfaceStringSearchable{publicfunctionsearch($substring,$buffer);}classBoyerMooreStringSearchimple... 阅读全文

posted @ 2010-04-21 23:08 Phinecos(洞庭散人) 阅读(960) 评论(0) 推荐(0) 编辑

PHP中的魔术方法
摘要:PHP中有下列称之为魔术方法(magic method)的函数:__construct, __destruct ,__call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup,__toString, __set_state, __clone and __autoload,本文使用__call为实现一个身份验证的简单实... 阅读全文

posted @ 2010-04-19 21:05 Phinecos(洞庭散人) 阅读(843) 评论(0) 推荐(0) 编辑

导航

统计

点击右上角即可分享
微信分享提示