Setting the font path using PHP's environment variable GDFONTPATH is not valid?

[problems encountered]

when drawing with PHP"s GD library, the font path variable is set as follows, and the image cannot be output:

putenv("GDFONTPATH=C:\Windows\Fonts");
$fontname="arial.ttf";
imagettftext($im,$font_size,0,$text_x,$text_y,$font_color,$fontname,$text);

but if you write down the path directly, everything will be fine:

$fontname="C:\Windows\Fonts\arial.ttf";
imagettftext($im,$font_size,0,$text_x,$text_y,$font_color,$fontname,$text);

[Test Environment]
operating system: Windows 10 Family Chinese version 1803
PHP version: PHP5.6.12

I searched around and saw that someone said that the GDFONTPATH environment variable was not supported by Windows. Is that true?

Php
Mar.23,2021

Don't use arial.ttf , just try arial .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45d87-44b6c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45d87-44b6c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?