누군가 captcha를 만들려고 할 때 왜 내가 imagettftext 함수를 사용할 수 없는지 말해 줄 수 있습니까? 그것은 imagestrings와 잘 작동하지만 글꼴 크기가 작아서 imagettftext를 사용해야합니다 ... Wamp에 문제가 있습니까? 시간 내 줘서 고마워!이 경우 PHP imagettftext 함수가 작동하지 않는 이유는 무엇입니까?
PHP 코드 (지금까지) :
<?php
session_start();
header("Content-Type: image/png");
$text = $_SESSION['secure'];
$font_size = 30;
$image_width = 200;
$image_height = 40;
$image = imagecreate($image_width, $image_height);
imagecolorallocate($image, 255, 255, 255);
$text_color = imagecolorallocate($image, 0, 0, 0);
imagettftext($image, $font_size, 0, 15, 30, $text_color, 'arial.ttf', $text);
imagepng($image);
?>
Index.php는 :
당신이 준 어떤 작은 정보에서<?php
session_start();
$_SESSION['secure'] = rand(1000,9999);
?>
<img src="createanimage.php" />
"사용할 수 없다"는 것은 무엇을 의미합니까? 오류 로그를 게시 할 수 있습니까? – JM4