我收到以下错误:
消息: imagecreatefrompng():SSL操作失败,代码1
消息: imagecreatefrompng():未能启用密码
当我使用PHP运行这段代码时。
function image_test() {
$im = imagecreatefrompng(base_url()."assets/developed/images/center-poster-bg-transparent.png");
imagepng($im, APPPATH."../TESTIMAGE.png");
}有人能帮我弄清楚为什么会发生这种事吗?
发布于 2017-05-05 10:10:44
我猜你使用了代码点火器框架。我之前也有同样的问题。我的解决方案是使用码点火器参数FCPATH。
你的代码:
function image_test() {
$im = imagecreatefrompng(base_url()."assets/developed/images/center-poster-bg-transparent.png");
imagepng($im, APPPATH."../TESTIMAGE.png");
}必须修改为
function image_test() {
$im = imagecreatefrompng( FCPATH."assets/developed/images/center-poster-bg-transparent.png" );
imagepng($im, APPPATH."../TESTIMAGE.png");
}希望它能帮到你。
https://stackoverflow.com/questions/37170628
复制相似问题