html 中
<img class="cimg" src="__URL__/verify?id=2>" width="50" height="22" onclick=""http://blog.51cto.com/viewpic.php?refimg=" + 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);
}
tp框架点击刷新验证
时间: 2024-10-06 08:28:44