我正在尝试在图像上写入文本。它可以在本地系统上正常工作,但是当我将它上传到活动服务器时它不起作用。 我的代码是脚本在本地运行,但不在运行
$imgPath = base_url() . "public/images/mix/theatre.jpg";
$jpg_image = imagecreatefromjpeg($imgPath);
// Allocate A Color For The Text
$color = imagecolorallocate($jpg_image, 102, 20, 99);
// Set Path to Font File
$font_path = FCPATH . "public/fonts/Myriad Pro.TTF";
//echo $font_path = base_url()."/public/fonts/Myriad Pro.TTF";
// Set Text to Be Printed On Image
$text = "NOW SHOWING";
// Print Text On Image
$imagettf = imagettftext($jpg_image, 16, 0, 57, 140, $color, $font_path, $text);
$savedImage = imagejpeg($jpg_image, $saveToPath);
var_dump($savedImage);
它给了我这是我从$imgPath
复制相同的图像,文本没有写在上面
什么是被倾销的结果呢? – 2014-10-27 20:40:35