以下是我在应用到过的一些Yii中的解决方案,计划不断更新。
如何在Yii中使用PHPExcel 扩展
How to use PHPExcel external library with Yii
启用Gzip
Enabling Gzip
如何用ActiveRecords记录数据变更日志
How to log changes of ActiveRecords
以下是我在应用到过的一些Yii中的解决方案,计划不断更新。
如何在Yii中使用PHPExcel 扩展
How to use PHPExcel external library with Yii
启用Gzip
Enabling Gzip
如何用ActiveRecords记录数据变更日志
How to log changes of ActiveRecords
借助第三方类库adLDAP,将adLDAP.php复制到项目的vendors目录中。修改UserIdentity.php
<?php /** * UserIdentity represents the data needed to identity a user. * It contains the authentication method that checks if the provided * data can identity the user. */ class UserIdentity extends CUserIdentity { public function authenticate() { $ldapConfig = Yii::app()->params['ldap']; Yii::import('application.vendors.*'); require_once('adLDAP.php'); try { $adldap = new adLDAP($ldapConfig); } catch (adLDAPException $e) { echo $e; exit(); } if(!$adldap->authenticate($this->username, $this->password)) $this->errorCode=self::ERROR_PASSWORD_INVALID; else { $adInfo = $adldap->user_info($this->username); $this->setState('ad_info',$adInfo); $this->setState('login_time',time()); $this->errorCode=self::ERROR_NONE; } return !$this->errorCode; } }
基于 Timothy Denike 的 TomcatStats v0.1 修改,去掉了perl的采集脚本,改为PHP实现(SimpleXML)。
Step 1.
配置Tomcat Manager
Step 2.
将采集脚本tomcatstats.php得到到 <cacti_root>/scripts/ 目录下。导入模板cacti_host_template_tomcat_server.xml
Step 3.
调试,在命令行下输入,测试是否可以获取数据。
php tomcatstats.php app1:8444 admin passwords
Step 4.
根据实现设定的账号密码设定Cacti Data Input Methods 中Tomcat Status Input String项
Step 5.
创建图像。
详见附件 »Read More
一大早Twitter Timeline 上满是Google+的散布推,跟@luosheng同鞋要了一个邀请,尝尝鲜~~
有需要邀请的同鞋请留下你的Gmail.
Update:现在G+邀请功能不定期开放,所以邀请可能无法及时发送,但请大家耐心等待,一旦邀请开放,我会第一时间处理大家的留言
Update:记得圈我哦,http://gplus.to/nerrsoft
Comments