分类目录
-
最近文章
Recent Comments
- 正在加载...
标签
centos command css debian Desktop eAccelerator Eagles Eminem FireFox freebsd godaddy Godaddy域名优惠码 google hostname Lady Antebellum linkinpark linux live Love The Way You Lie mbstring mb_substr mp3 Music mv namecheap namecheap coupon code namecheap优惠码 namecheap最新优惠码 need you now payoneer photo php php_mbstring Picture rihanna the cure wordpress zeus 便宜vps 创意广告 域名优惠码 富士康 电影 翻墙 闫凤娇链接表
Monthly Archives: 二月 2010
mb_substr修正函数
不支持mb_substr函数的环境中使用了mb_substr函数会出现“Fatal error: Call to undefined function mb_substr()”的提示,下面的函数是定义的替代mb_substr的函数,作用是一样的,用于不支持mb_substr的地方。 // Patch in multibyte support if (!function_exists(‘mb_substr’)) { function mb_substr($str, $start, $len = ”, $encoding="UTF-8"){ $limit = strlen($str); for ($s = 0; $start > 0;–$start) {// found the real start if ($s >= … Continue reading
eAccelerator-0.9.6安装笔记
cd tmp wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2 tar -jxvf eaccelerator-0.9.6.tar.bz2 cd eaccelerator-0.9.6 /usr/bin/phpize ./configure –enable-eaccelerator=shared –with-php-config=/usr/bin/php-config make make install (注:以上文中“phpize”以及“php-config”的路径如果不知道可以使用find命令事先查找一下。) 安装完毕编辑php.ini将其安装为 PHP extension 模式 在php.ini中添加如下: extension="eaccelerator.so" eaccelerator.shm_size="16" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.log_file = "/var/log/httpd/eaccelerator_log" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9" 最后创建/tmp/eaccelerator目录 … Continue reading