【问题标题】:CodeIgniter File Uploading Class , encrypt_nameCodeIgniter 文件上传类, encrypt_name
【发布时间】:2011-01-10 07:33:32
【问题描述】:

您好,有没有办法限制上传类分配给文件名的字符。

谢谢..

【问题讨论】:

    标签: php codeigniter upload


    【解决方案1】:

    是的,您可以使用 max_filename 参数来做到这一点。

    From CI User Guide

    max_filename:文件名的最大长度。设置为零无限制。

    更新: 如果你想用 encrypt_name 来做,你可以设置 file_name 参数。

    $config['file_name'] = substr(md5($file_name),15);
    

    【讨论】:

    • 没有简单的方法。您必须扩展上传库。
    猜你喜欢
    • 2013-07-26
    • 1970-01-01
    • 2013-07-23
    • 2018-01-25
    • 1970-01-01
    • 1970-01-01
    • 2011-10-19
    • 2011-11-06
    相关资源
    最近更新 更多