要输出的地方是id为209的“页面”
在主题文件夹下的page.php中
<?php if(is_page('209')){ header("Content-type: image/gif"); header("Cache-Control: no-cache"); $rands = rand(1000,9999); $im = imagecreate(40, 15); //var_dump($im);exit(); imagecolorallocate($im, 240, 240, 240); $loc = 2; $color1=imagecolorallocate($im, 0, 0, 0); for($i=0;$i<4;$i++){ $color=imagecolorallocate($im, rand(0,255), rand(0,255), rand(0,255)); imagestring($im, 4, ($loc+1), 1, substr($rands,$i,1), $color1); imagestring($im, 4, $loc, 0, substr($rands,$i,1), $color); $loc += 9; } imagegif($im); imagedestroy($im); exit(); } //验证码?>
你是如何调用 page.php 的?
是用 img 标签吗?
你是如何调用 page.php 的?
是用 img 标签吗?
我现在直接输出都输不出来
http://localhost:8889/验证码/
全网最新最细最实用WPS零基础入门到精通全套教程!带你真正掌握WPS办公! 内含Excel基础操作、函数设计、数据透视表等
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号