将从Windows下开发好的代码转移至CentOS下,发现验证码不能显示。
访问验证码页面显示以下错误:
Warning: p_w_picpathttftext() [
function.p_w_picpathttftext]: Could not find/open font in
/usr/local/apache2/htdocs/slms/include/yzm.php on line
24
经过搜索发现,linux不支持相对路径,汗。
经过搜索发现,linux不支持相对路径,汗。
所以只能将路径写全了。
/usr/local/apache2/htdocs/slms/include/arial.ttf
转载于:https://blog.51cto.com/yuhaijunll/191449