In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you php gd Chinese garbled code how to do, the content is easy to understand, clear, hope to help you solve doubts, the following let Xiaobian take you to study and learn "php gd Chinese garbled code how to do" this article.
Php gd Chinese garbled solutions: 1, open the corresponding PHP code file; 2, through the GD library output Chinese string, the use of imagettftext () function can solve the garbled problem.
This article operating environment: Windows7 system, PHP7.1 version, DELL G3 computer
Today, I carefully studied some related technologies of GD, and also studied the problem of Chinese garbled code in GD.
Using the GD library to output Chinese strings, it is useless to call imagestring. The imagettftext () function is required. The specific use of the imagettftext function is referred to the manual.
Here is a use example:
$pic=imagecreate (250,50,030); $black=imagecolorallocate ($pic,0,0,0); $white=imagecolorallocate ($pic,255255255); $font= "C://WINDOWS//Fonts//simhei.ttf"; / / the path here must be the path of the character $str = 'php'.iconv (' gb2312','utf-8',' faces the object'). " Www.phpobject.net "; imagettftext ($pic,10,0,10,20,$white,$font,$str); what are the PHP development environment building tools? phpStudy is the most commonly used development environment for beginners. Second, WampServer,WampServer is also as simple as phpStudy and more friendly to rookies. Third, XAMPP,XAMPP (Apache+MySQL+PHP+PERL) is a powerful integrated software package for building stations; fourth, MAMP,MAMP is divided into two types: MAMP and MAMP Pro for Mac. Pagoda panel, pagoda panel is a server management software that supports windows and linux systems. 6. UPUPW,UPUPW is the most characteristic Web server PHP suite under the Windows platform.
The above is about "what to do about php gd Chinese garbled code". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.