title: php text to image imagettftext()
body: <pre><code>header("Content-type: image/jpeg");
  $image= imagecreate(120,50);
  
  $txt="hello world!";
  $bg=    imagecolorallocate($image,255,255,255);
  $clr=   imagecolorallocate($image,0,0,0);
  
  imagettftext($image,12,0,5,35,$clr,'font.ttf',$txt);
  
  
  imagejpeg($image);
  </code></pre>
  
  <hr>
  
  <p>this works on local xampp server on windows 7<br>
  but when i upload it to server it does not show image  </p>
  
  <hr>
  
  <p>but when i replace imagettftext() with imagestring() then it works,<br>
  and i am sure i have uploaded font.ttf file.</p>