我有一个我从互联网上下载的代码,代码负责形成验证码图像,但它没有这样做,当我直接访问页面时说它
Fatal error: Call to undefined function colorallocate() in /home/directory/directory/www/random.php
random.php的代码如下
//Allocate colors for letters.
$textColor1 = imagecolorallocate ($image, $colors[$color1][0],$colors[$color1][1], $colors[$color1][2]);
$textColor2 = imagecolorallocate ($image, $colors[$color2][0],$colors[$color2][1], $colors[$color2][2]);
$textColor3 = imagecolorallocate ($image, $colors[$color3][0],$colors[$color3][1], $colors[$color3][2]);
$textColor4 = imagecolorallocate ($image, $colors[$color4][0],$colors[$color4][1], $colors[$color4][2]);
$textColor5 = imagecolorallocate ($image, $colors[$color5][0],$colors[$color5][1], $colors[$color5][2]);
$textColor6 = imagecolorallocate ($image, $colors[$color6][0],$colors[$color6][1], $colors[$color6][2]);
要查看完整代码,请访问http://pastebin.com/eSiSqFrf