Jump to content

include statements in GD?


TFD3

Recommended Posts

Trying to figure out how to use the include statement in a GD script.

When I use the include statement on line 18 in the script below I get an error

Parse error: syntax error, unexpected T_STRING in /home/bamastrm/public_html/script/exper/png_create.php on line 18

 

Any ideas how to correct this? thanks

 

<?php
header("Content-Type: image/jpeg");
$im = ImageCreateFromJpeg("template.jpg"); 

$yellow = ImageColorAllocate($im, 255, 242, 0);
$black = ImageColorAllocate($im, 0, 0, 0);


$kbmx = "51°";
$start2_x = 231;
$start2_y = 222;

$kmgm = "51°";
$start_x = 234;
$start_y = 226;


Imagettftext($im, 25, 0, $start_x, $start_y, $black, 'impact.ttf', " include("temp.php") ");
Imagettftext($im, 25, 0, $start2_x, $start2_y, $yellow, 'impact.ttf', "");


Imagejpeg($im, '', 100);
ImageDestroy($im);
?> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.