Mysql/Mysqli 类文件
支持 mysql和mysqli 自动选择,支持读写分离,是用于 mysql 集群的数据库操作
很多个 memcache.dll 涵盖PHP 5.2 -5.5 。我找到一个能用的,现在共享给大家。 配置如下: 1、开启memcached 服务,注意路径 memcached.exe -d install(安装,cmd 需要已管理员身份运行) memcached.exe -d start(自动启动) 2、调整 php.ini 增加如下内容 extension=php_memcache.dll [Memcache] memcache.allow_failover = 1 memcache.max_failover_attempts= 20 memcache.chunk_size = 8192 memcache.default_port = 11211 测试代码:注意端口的匹配 $memcache = new Memcache; $memcache->connect("localhost",11211); echo "Server's version: " . $memcache->getVersion() . "\n"; $tmp_object = new stdClass; $tmp_object->str_attr = "test"; $tmp_object->int_attr = 123; $memcache->set("key",$tmp_object,false,10); echo "Store data in the cache (data will expire in 10 seconds)\n"; echo "Data from the cache:\n"; var_dump($memcache->get("key"));
memcache win8 x64 php5.4.7 测试通过(开发套件 xampp 1.8.1) 配置如下: 1、开启memcached 服务,注意路径 memcached.exe -d install(安装) memcached.exe -d start(自动启动) 2、调整 php.ini 增加如下内容 extension=php_memcache.dll [Memcache] memcache.allow_failover = 1 memcache.max_failover_attempts= 20 memcache.chunk_size = 8192 memcache.default_port = 11211 测试代码:注意端口的匹配 $memcache = new Memcache; $memcache->connect("localhost",11211); echo "Server's version: " . $memcache->getVersion() . "\n"; $tmp_object = new stdClass; $tmp_object->str_attr = "test"; $tmp_object->int_attr = 123; $memcache->set("key",$tmp_object,false,10); echo "Store data in the cache (data will expire in 10 seconds)\n"; echo "Data from the cache:\n"; var_dump($memcache->get("key"));
jquery上传图片前的预览功能,兼容 ie(6/7/8/9) 火狐... ie9 默认不显示图像预览,内附设置说明图片,和参考文档 jquery.uploadPreview.js 插件