
普遍缓存技术:
数据缓存:这里所说的数据缓存是指数据库查询缓存,每次访问页面的时候,都会先检测相应的缓存数据是否存在,如果不存在,就连接数据库,得到数据,并把查询结果序列化后保存到文件中,以后同样的查询结果就直接从缓存表或文件中获得。
用的最广的例子看Discuz的搜索功能,把结果ID缓存到一个表中,下次搜索相同关键字时先搜索缓存表。
举个常用的方法,多表关联的时候,把附表中的内容生成数组保存到主表的一个字段中,需要的时候数组分解一下,这样的好处是只读一个表,坏处就是两个数据同步会多不少步骤,数据库永......

<?php
function Pinyin($_String, $_Code='UTF8'){ //GBK页面可改为gb2312,其他随意填写为UTF8
$_DataKey = "a|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|
bin|bing|bo|bu|ca|cai|can|cang|cao|ce|ceng|cha".
"|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|
chuan|chuang|chui|chun|chuo|ci|cong|cou|cu|".
"cuan|cui|cun|cuo|da|dai|dan|dang|dao|de|deng|di|dian|diao|die|
ding|diu|dong|dou|du|duan|dui|dun|duo|e|en|er".
&quo......

出现”Deprecated: Assigning the return value of new by reference is deprecated in“ 显示出来。这是因为5.3以后,不能使用”=&”符号,可以直接用”=”就可以了。
所以当出现这个问题后有两种解决方法:
1. 把php的版本降级到5.3以下,但后退的不是明智的选择。
2. 对程序中”=&”符号全部用”=” 代替。
原文:http://www.dengor.com/archives/1023.html
作者: owoer
|
发表于:2012年7月13日
|
栏目:PHP
|
Assigning the return value of new by reference is deprecated in已关闭评论
阅读全文

需检查是否是以下这些情况:
1.无主键
2.字段允许为空
3.字段类型不匹配
4.字段是不是精度不够。
5.ADO控件 CursorLocation的属性,默认值为“clUseClient”,应设为“clUseServer”。
帮助文档资料如下:
Use CursorLocation to indicate whether the cursors that use the connection object to connect to the ADO datastore use a client-side or server-side cursor library. CursorLocation only affects connections opened after the property is set. The default value for CursorLocation is clUseClient.
A client-side cu......

新建.htaccess文件到网站跟目录,内容如下:
<IfModule mod_php5.c>
php_value upload_max_filesize 2000M
php_value post_max_size 2000M
</IfModule>
注意:
post_max_size,upload_max_filesize无法用ini_set进行设置,如下语句不会成功执行。
ini_set(‘post_max_size’,’1024M’);
ini_set(‘upload_max_filesize’,’1024M’);
更改php.ini的值,是乎也不成。
upload_max_filesize=2048M
post_max_size = 2048M
参考:http://hi.baidu.com/tianhuimin/item/11c965f......
作者: owoer
|
发表于:2012年6月12日
|
栏目:PHP
|
php动态更改post_max_size, upload_max_filesize等值已关闭评论
阅读全文