PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| <?php error_reporting(E_ALL); ini_set("display_errors", "on"); $height=100; $width=150; $text="hoi"; //header('Content-type: image/png'); $im = imagecreatetruecolor($width, $height); $background = imagecolorallocate($im, 100, 100, 100); $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); $blue = imagecolorallocate($im, 0, 0, 255); $red = imagecolorallocate($im, 255, 0, 0); imagefilledrectangle($im, 0, 0, $width, $height, $background); $font = 'arial.ttf'; imagefttext($im, 20, 0, 0, 0, $white, $font, $text); imagestring($im, 5, 0, 50, $text, $black); imagestring($im, 5, 75, 0, $text, $blue); imagestring($im, 5, 75, 50, $text, $red); //imagepng($im); imagedestroy($im); ?> |
Dit levert geen foutmeldingen op en wanneer ik de // bij de header en imagepng weghaal krijg ik alleen de 3 imagestring hoi's te zien. Er staat een arial.ttf bestand in dezelfde map als dit bestand.
Rebuilding knowledge database