01 2015 档案
php 去除数组中重复元素
摘要:去除数组中重复元素, 找了下可以一下两个函数php array_flip()与array_uniqure()$arr = array(…………) ;// 假设有数组包含一万个元素,里面有重复的元素。$arr = array_flip(array_flip($arr)); // 这样便可以删除重复元素...
阅读全文
123
摘要:要把redis彻底换成本地的, 报错咯Warning: Unknown: Failed to write session data (redis). Please verify that the current setting of session.save_path is correct (tcp...
阅读全文
Ubuntu14.04 安装 PHP cURL
摘要:今天遇到Fatal error: Call to undefined function curl_init() in/xxx/xxxx/www/application/library/Ku/Http.phpon line82要安装curl插件找了几篇文章, 都是说安装这个, 就装上去咯# sudo ...
阅读全文
PHP时间戳
摘要:strtotime strtotime("Today"); #今天凌晨0点的时间戳 strtotime('now'); #当前时间的时间戳 strtotime ( "10September2000" ); #2000年九月10号时间戳 strtotime ( "+1day" ); #24...
阅读全文
Ubuntu14.04 开启MySQL的remote access
摘要:一旦开启MySQL的remote access, 即可实现在windows系统下连接ubuntu下的mysql步骤如下:sudo vim /etc/mysql/my.cnf bind-address = 127.0.0.1 #表示仅允许此ip地址访问,将其注释去phpmyadmin下, ...
阅读全文
Mysql数据库迁移 Ubuntu14.04
摘要:1. 停止数据库服务sudo service mysql stop2. 创建数据迁移目标文件夹(实际应该是挂载到新硬盘上)cd /var/libls -ldrwx------ 6 mysql mysql 4096 1月 9 09:26 mysql/ #文件夹权限700, 只有mysq...
阅读全文
Ubuntu14.04进入文本模式方法
摘要:ubuntu 10.10以前的操作方法:1 第一步,具体命令及操作如下:sudo vi /etc/init/rc-sysinit.confenv DEFAULT_RUNLEVEL=3 <------将原来的env DEFAULT_RUNLEVEL=2修改为env DEFAULT_RUNLEVEL=3...
阅读全文
浙公网安备 33010602011771号