我正在寻找这个问题的答案是很长时间.我找到的所有解决方案都是捕捉字体名称,但我很确定这不是我的问题.
它看起来像是安装了GD
array(11) {
["GD Version"]=>
string(27) "bundled (**2.0.34 compatible**)"
["FreeType Support"]=>
bool(false)
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPEG Support"]=>
bool(true)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(true)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}
Run Code Online (Sandbox Code Playgroud)
上面你可以看到我的GD支持.我的PHP版本是5.3,我在Linux上运行.
我尝试过来自不同网站的几个不同的代码示例,但都没有.ImageString确实适合我,但我需要让imagettftext工作..
这是我现在尝试的最后一个代码 -
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
// Set the content-type
header('Content-Type: image/png');
// Create the image
$im = imagecreatetruecolor(400, 100) or die("Can't create image!");
// Create some colors
$white = imagecolorallocate($im, …Run Code Online (Sandbox Code Playgroud)