phpå¾çå¤çä¹äºç»´ç å æå_php_web-itnose
é¦é¡µ
asp
php
javascript
iis
apache
html/css
coldfusion
ajax
vbscript
cgi
xml/xsl
è·¨æµè§å¨å¼å
ruby/rails
ç¨åºå
html5
jquery
seo
jboss
json
angularjs
markdown
nginx
thinkphp
yii
pageadmin
extjs
wampserver
kendo ui
coffeescript
gulp
ecmascript
bootstrap
itnoseé¦é¡µ > web > php >
phpå¾çå¤çä¹äºç»´ç å æå
2017-06-13 11:24
éæ±
客æ·åå管çç³»ç»ï¼æ¯ä¸ªååéè¦çæä¸ä¸ªäºç»´ç 以便ææºç´æ¥æ«ææ¥çååä¿¡æ¯ï¼è对åºçï¼äºç»´ç ä¸æ¹å¿ é¡»æä¸ä¸²å¯ä¸ç ï¼å®ä»¬åå¨äºä¸å¼ å¾çä¸ï¼ä»¥æ¹ä¾¿ç¨æ·å¦åæå°è´´çº¸ï¼ä¸ç¸å¹²ç»èçç¥ï¼ã
åæ
å°é¾æ¥çæäºç»´ç ä¸é¾ï¼ç´æ¥qrcodeå³å¯è§£å³ã
å©ä¸ç对åºå¯ä¸ç ï¼ä¾å¦ï¼wy998823, æç¹å®ç®æ³çæç åï¼éè¦ä¸äºç»´ç å¾çéæ°åæ为ä¸å¼ å¾çï¼phpä¸çå¾çå¤çï¼ä¸ç¨è¯´ï¼é¦å½å ¶å²gdåºã
è¿ç¨
ç±äºä»£ç æ¶åè¾å¤ï¼å°±ä¸ç´æ¥è´´åºæ¥äºãæ¤å¤ç®è¿°ç¨å°çæ¹æ³åæµç¨ï¼ä¾å¤§å®¶åèã
æå¼å¾ç
å° qrcode çæçäºç»´ç å¾çæç
§ è·¯å¾ æå¼ï¼è·åç¸å
³ä¿¡æ¯ã
宽度类åçä¿¡æ¯å¯ä»¥ç¨ getimagesize() è·å
æå¼å¾çï¼$image = imagecreatefrompng($file);
å¦æäºå
ä¸ç¥éåå¾çæ ¼å¼çè¯ï¼å¯ä»¥éç¨ä¸é¢æ¹æ³ï¼
$info = getimagesize($file); // è·åå¾çä¿¡æ¯
$type = image_type_to_extension($info[2],false); // è·åå¾çæ©å±å
$fun = “imagecreatefrom{$type}”; // æ建å¤çå¾çæ¹æ³å-å
³é®æ¯è¿é
$image = $fun($file); // è°ç¨æ¹æ³å¤ç
å¤çå¾ç
å°åä½æ件åå¤å¥½ï¼è®¾ç½®å¥½åä½çé¢è²ï¼ç¶åå建æåï¼
$font = root_path.’public/static/fonts/msyh.ttf’; // åä½æ件
$color = imagecolorallocate($image,0,0,0); // æåé¢è²
imagettftext($image, 20, 0, 80, 292, $color, $font, $code); // å建æå
è¿éæç´æ¥åå¨äºäºç»´ç å¾ççä¸è¾¹æ¡ç©ºç½å¤
è¾åºå¾ç
å°è¿é对äºåå¾ççå¤çåºæ¬å°±ç»æäºã
ä½¿ç¨ header() å imagepng() æ¹æ³è¾åºæç»å¾çï¼
header(“content-type:image/png”);
imagepng($image);
å¦æå¾çæ ¼å¼ä¸ç¡®å®ï¼åç
§ä¸é¢ç¬¬ä¸æ¥ä¸ç»åºçä¾åå¤çï¼è¿éæ没æä¿åå°æ¬å°ã
éæ¯å¾ç
éæ¯çæçå¾çèµæºåqrcodeçæçå¾çæ件ã
header(‘content-type:image/png’);
imagepng($image);
imagedestroy($image);if (is_file($file)) unlink($file);
ææ
çæåææå¦å¾ï¼ä¿¡æ¯èèï¼äºç»´ç å¾åå·²æç ï¼
æ»ç»
å¾åè½å¦å¤çåå¤çå¾å¥½ï¼å°±çå¦ä½ä½¿ç¨gdåºäºã
ç¸å
³æç´¢ï¼
vb.net äºç»´ç
äºç»´å¾è¡¨
vb.net äºç»´æ°ç»
jspå¾ç
sqlserver å¾ç
ç¸å ³æç«
2016-12-11 20:56 phpçæäºç»´ç å¾ç
2017-02-17 18:47 phpæä¹ä¸è½½çæçå¾çäºç»´ç ï¼
2016-08-13 12:25 laravel 产çäºç»´ç
2015-09-02 00:35 phpçæäºç»´ç ï¼dcode
2014-04-28 10:35 phpçæäºç»´ç ç2ç§æ¹å¼
æ´å¤ç¸å ³æç« >>
ææ°æç«
2017-06-20 01:35 èé们ï¼æ没æå¯è½è®©phpæ件åæ¶åªè½ä¸ä¸ªäººè®¿é®
2017-06-20 01:35 æä¹ç¦æ¢å¾çç´æ¥éè¿url访é®
2017-06-20 01:35 æ±æ!å¯å¨wampåªè½ç¨æ¬æºè®¿é®,åå±åç½çå
¶å®è®¾å¤è®¿é®ä¸å°!æäºå¤§å天t-t
2017-06-19 15:35 nginxä¸çthinkphpé®é¢
2017-06-19 15:35 php form æ件ä¸ä¼
æ´å¤ææ°æç« >>
çé¨æç´¢
webserviceå¼å¸¸å¤ç
jquery å¤çxml
c++å¾åå¤ç
spring mvcä¸ä¼ å¾ç
javawebä¸ä¼ å¾ç
delphi æç»´
cè¯è¨å¾ç
hibernate äºå¡å¤ç
hibernateäºå¡å¤ç
db2 å¼å¸¸å¤ç
php jsp
php webservice
php å¾è¡¨
php xml
delphi for php
京icpå¤14022385å·-2
©2014 itnose软件ç¼ç¨æç¨ | èç³»æ们ï¼emailï¼twobrushes@126.com qq:35155868