主页

yii 实现字段排序

为了实现yii1里面字段排序,看了些资料还是没有解决,最后不行了,就直接在header添加连接。。。。 array( "name" => "insertDate", "header" => "<a href="".Yii::app()->createUrl("data/user/list2")."">注册时间</a>", "value" => function ($data){ echo date("Y-m-d H:i:s",$data->insertDate); } //"class" => "application.components.columns.G...

阅读更多

mysql进入安全模式修改密码。

步骤: 首先sudo /etc/init.d/mysql stop停止服务器 执行sudo mysqld_safe --skip-grant-tables & 确定服务器已停止, [1] 5239 melina@melina-laptop:~$ 110320 21:13:14 mysqld_safe Logging to syslog. 110320 21:13:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 看到上面的结果后,输入mysql -u melina 出现下面结果: Welcome to the MySQL monitor. Commands end with ...

阅读更多

wget 搭建lnmp环境

安装必要的软件 yum install -y update yum install pcre yum install openssl* yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libid...

阅读更多

chart视图

$config = array( "chart" => array( "zoomType" => "xy", ), "title" => array( "text" => $this->title, ), "subtitle" => array( "text" => $this->description, ), "xAxis" => array( ...

阅读更多

PHP数组合并去重统计

$a = array("1001","1002"); $b = array("1002","1003","1004"); $c = array("1003","1004","1005"); $d = count(array_flip($a) + array_flip($b) + array_flip($c));

阅读更多

解决PHP使用普通账号连接mongodb报错问题

起先使用mongodb来开发,未加上账号密码验证功能. mongodb一直正常,准备放到线上之时加上账号密码功能,整个过程如下: mongo配置 增加mongodb账号 增加用户a_ttlsa_com对a_ttlsa_com这个库有读写权限,密码为ttlsa.com.passwd # mongo MongoDB shell version: 2.4.5 connecting to: test > use a_ttlsa_com switched to db a _ttlsa_com > db.addUser("a_ttlsa_com","ttlsa.com.passwd") { "user" : "a_ttlsa_com", "read...

阅读更多