【发布时间】:2015-06-21 08:43:35
【问题描述】:
我想以与该图片链接中显示的相同方式获取结果。我尝试了很多次以获得该解决方案,但无法找到任何解决此问题的方法。图片链接(http://haha123456.hol.es/death/abs2.jpg)
我的html代码是:
<html>
<body>
<form action="result.php" method="get">
<input type="text" name="name" id="name">
<input type="button" name="submit" id="submit">
</form>
</body>
</html>
我的php代码是:result.php
<?php
header('Content-type: image/jpeg');
$jpg_image = imagecreatefromjpeg('Desert.jpg');
$white = imagecolorallocate($jpg_image, 73, 41, 236);
$font_path = 'OpenSans-Italic.TTF';
$text = $_GET['name'] ;
imagettftext($jpg_image, 25, 0, 75, 50, $white, $font_path, $text);
imagejpeg($jpg_image);
imagedestroy($jpg_image);
?>
而且我还为每个字母创建了一些数组,但只是没有得到正确的命令来拆分作为输入给出的单词并根据链接图片中给出的每个字母从数组中显示一些单词。
【问题讨论】:
-
你能发布你的错误或什么不工作?