我尝试了许多不同的方法,现在我尽可能明确。我在带有 PHP/pChart 的 Windows 7 上使用 xampp。在我的代码中,我有:
<?php
include('pChart/pData.class');
include('pChart/pChart.class');
putenv('GDFONTPATH=' . 'C:\Windows');
...
$Test->setFontProperties("/Fonts/tahoma.ttf",8);
...
?>
我确实在字体前面包含了“/”,这样库就不会意外附加我阅读的 .ttf,在某些情况下可能会发生这种情况。
在此问题上的任何帮助将不胜感激。