php - Verification code is available under windows, but not in centos?
为情所困
为情所困 2017-06-30 09:53:14
0
2
865

Font in$this->font = dirname(__FILE__).'/font/elephant.ttf';
Display background:

imagefilledrectangle($this->img,0,$this->height,$this->width,0,$color);

Display code:

imagettftext($this->img,$this->fontsize,mt_rand(-30,30),$_x*$i+mt_rand(1,5),$this->height / 1.4,$this->fontcolor,$this->font,'字');

The verification code can be displayed in windows, as follows:

This is the only way in centos

为情所困
为情所困

reply all(2)
習慣沉默

There is no gd extension on centos

仅有的幸福

Turn on error messages to know what went wrong display_errors

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!