图片上传CodeIgniter [英] Photo upload CodeIgniter

查看:60
本文介绍了图片上传CodeIgniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用CodeIgniter上传照片时,图像名称会更改为随机名称,例如"107fb08f4a11cc37a040237cdcf0e48a.jpg".我在视图中显示数据库中的图像时遇到了麻烦,因为它显示的是原始上传名称,而不是新名称.如何禁用更改此名称的功能?

When I upload a photo using CodeIgniter, the name of the image is changed to a random name like "107fb08f4a11cc37a040237cdcf0e48a.jpg" for example. I am having trouble showing the image from the database in the view because it is showing the original upload name and not the new name. How do I disable the function that changes this name?

这些是配置设置:

$config = array(
    'upload_path'   => './uploads/',
    'allowed_types' => 'gif|jpg|png',
    'max_size'  => '6000',
    'max_width' => '2068',
    'max_height'    => '1032',
    'encrypt_name'  => true,
);

推荐答案

更改:

'encrypt_name'  => true,

收件人:

'encrypt_name'  => false,

这篇关于图片上传CodeIgniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆