摘要: 转自http://kennyluo.iteye.com/blog/1405083#commentsMemcache函数库是在PECL(PHP Extension Community Library)中,主要作用是搭建大容量的内存数据的临时存放区域,在分布式的时候作用体现的非常明 显,否则不建议使用。Memcache::add -添加一个值,如果已经存在,则返回falseMemcache::addServer -添加一个可供使用的服务器地址Memcache::close -关闭一个Memcache对象Memcache::connect -创建一个Memcache对象memcache_debug 阅读全文
posted @ 2012-02-17 23:31 Souris 阅读(199) 评论(0) 推荐(0)
摘要: 转自:http://dmthlbfjm.iteye.com/blog/1405408内容:<?function GetIP() { //获取IPif ($_SERVER["HTTP_X_FORWARDED_FOR"])$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];else if ($_SERVER["HTTP_CLIENT_IP"])$ip = $_SERVER["HTTP_CLIENT_IP"];else if ($_SERVER["REMOTE_ADDR" 阅读全文
posted @ 2012-02-17 23:08 Souris 阅读(159) 评论(0) 推荐(0)
摘要: 来自:http://phpweby.com/tutorials/php/35PHP is not limited to outputting html. PHP can output images, pdf, javascript files, etc. Browsers determine what type of content is by analyzing the headers sent. In this tutorial I will present you with some examples of how to send headers. To send PHP header 阅读全文
posted @ 2012-02-17 23:03 Souris 阅读(1933) 评论(0) 推荐(0)
摘要: 转自:http://www.oschina.net/question/28_37512?from=20120212使用明确、统一的标明和列名,例如 School, SchoolCourse, CourceID。数据表名使用单数而不是复数,例如 StudentCourse,而不是StudentCourses。数据表名不要使用空格。数据表名不要使用不必要的前缀或者后缀,例如使用School,而不是TblSchool,或者SchoolTable等等。数据库中的密码要加密,到应用中再解密。 (其实就是散列存储、单向加密)使用整数作为ID字段,也许现在没有这个必要,但是将来需要,例如关联表,索引等等。使 阅读全文
posted @ 2012-02-12 21:27 Souris 阅读(182) 评论(0) 推荐(0)
摘要: windows下安装mongodb及php驱动08.18.2010,顶部导航菜单, by℃冻番茄.mongodb是nosql的典型了,采用是json类似的存储格式mongodb官网下载windows平台下的服务端: http://www.mongodb.org/downloadsmongodb的php驱动:http://github.com/mongodb/mongo-php-driver/downloadsmongodb下载后,解压到D盘,最终地址是:D:\mongodb\binphp驱动 php_mongo.dll 解压至php的ext文件夹下,然后修改php.ini,添加 extensi 阅读全文
posted @ 2012-01-09 23:15 Souris 阅读(1725) 评论(0) 推荐(0)
摘要: 转载:http://www.phpweblog.net/maple094/archive/2008/05/29/4000.html今天在新的linux上跑原来的代码,使用的虚拟主机的模式进行操作。几个相关的网站放在一个文件里,想法是通过网站列出的目录进行相应的网站进行操作。一切设置完成后,在浏览器中运行出现在You don't have permission to access / on this server. 提示。查了一下apache手册找到问题所在处。这里定义了默认对网站根的访问权限。#EachdirectorytowhichApachehasaccesscanbeconfig 阅读全文
posted @ 2012-01-08 00:41 Souris 阅读(178) 评论(0) 推荐(0)
摘要: 注:原文来自http://blog.csdn.net/rainysia/article/details/6740875,我仅仅说说我自己遇到的问题1: 下载php5.3.8 for windows.说明一下,官网的windows版本有2种,上面是非线程安全的VC9 x86 Non Thread Safe , 缺少了php5apache2_2.dll 这些文件, 大小是14.93M .下面那个Thread Safe线程安全版的.才是我们需要的,大小是15.06M猛击这里下载php5.3.8 for windows VC9 X86至于VC6和VC9,一个支持apache一个支持IIS.但是试了下V 阅读全文
posted @ 2012-01-07 21:56 Souris 阅读(546) 评论(0) 推荐(0)