Ajoutez du texte en filigrane, le chinois sera tronqué
php_huang
php_huang 2017-09-06 10:32:28
0
1
1381

<?php
$src = "02.png";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom{$type} ";
$image = $fun($src);
$font = "arial.ttf";
$content = "欢迎来到PHP中文网";
$col = imagecolorallocatealpha($image, 255, 255, 255 , 30);
imagettftext($image, 20, 0, 20, 30, $col, $font, $content);
header("content-type:".$info['mime']);
$func = "image{$type}";
$func($image);
$func($image,'FFF.'.$type);
imagedestroy($image);

php_huang
php_huang

学习可以不断提高自己,可以变得更全面、更专业、更充实。学海无涯,我将一直学下去。

répondre à tous(1)
ringa_lee

Ajoutez un en-tête devant, header("Content-type: text/html; charset=utf-8");

  • répondre Je l'ai essayé, mais cela n'a pas fonctionné. Merci.
    php_huang auteur 2017-09-06 16:49:20
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!