您好,欢迎光临! 推荐您使用Chrome浏览器访问本站。

PHP缓存技术

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

PHP汉字转拼音类

1,093 views
PHP汉字转拼音类 <?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......

Assigning the return value of new by reference is deprecated in

991 views
Assigning the return value of new by reference is deprecated in出现”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

php动态更改post_max_size, upload_max_filesize等值

1,053 views
php动态更改post_max_size, upload_max_filesize等值新建.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......

Warning: date(): It is not safe to rely on the system’s timezone settings.

1,035 views
Warning: date(): It is not safe to rely on the system’s timezone settings.PHP错误提示如:Warning: date(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Hong_Kong’ for ‘HKT/8.0/no DST’ instead in… 解决方法: 一、在页头使用date_default_timezone_set()设date_default_timezone_set......