Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用水印codeigniter加载字体时出错_Php_Codeigniter_Fonts_Watermark - Fatal编程技术网

Php 使用水印codeigniter加载字体时出错

Php 使用水印codeigniter加载字体时出错,php,codeigniter,fonts,watermark,Php,Codeigniter,Fonts,Watermark,谁能帮帮我吗。我正在尝试创建水印,但加载字体时遇到问题。 当我使用wm_font_path函数时,水印不会出现在图像上。 当我不使用wm_font_path函数时,水印将以系统默认字体显示 另一件事是wm_font_size函数不能正常工作,因为我无法增加字体大小 $image_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image

谁能帮帮我吗。我正在尝试创建水印,但加载字体时遇到问题。 当我使用wm_font_path函数时,水印不会出现在图像上。 当我不使用wm_font_path函数时,水印将以系统默认字体显示

另一件事是wm_font_size函数不能正常工作,因为我无法增加字体大小

$image_data                 = $this->upload->data();
$config['image_library']    = 'gd2';
$config['source_image']     = $image_data['full_path'];
$config['wm_type']          = 'text';
$config['wm_vrt_alignment'] = 'top';
$config['wm_hor_alignment'] = 'center';
//$config['wm_vrt_offset']    = '300';
$config['wm_text']          = $nome;
$config['wm_font_path']     = './media/fonts/unineuebold.ttf';
$config['wm_font_size']     = 60;
$config['wm_font_color']    = '#4a4a4a';
$this->load->library('image_lib', $config);
有人有这个问题吗


PHP 7.3版

您使用的是
'/media/fonts/unineubold.ttf'

所以目录级别应该是这样的

application
media
 - fonts
    - unineuebold.ttf 
system
tests

您好,目录级别正确。仍然未加载源,请确保字体有效。如果在现场进行测试,请检查其放置或移动是否正确