html 中

    <img class="cimg" src="__URL__/verify?id=2>" alt="" width="50" height="22" onclick="this.src='__URL__/verify/'+Math.random()" /></td>


在控制器中

        //验证码

public function verify() {

$type = isset($_GET['type']) ? $_GET['type'] : 'gif';

import("@.ORG.Util.Image");

Image::buildImageVerify(4, 1, $type);

}