douxiajia6309 2011-09-03 09:15
浏览 36
已采纳

我们可以用PHP减少图像文件大小吗?

Can we reduce an image file size with PHP if it exceed the the limit set by upload_max_filesize?

For instance, the upload_max_filesize at my serve is only 3MB, but the image file size for uploading is 4MB, so can I reduce 4MB to 3MB via some PHP function?

Or any other scripting programme can do this (I don't mean using Photoshop to reduce the file size)?

  • 写回答

4条回答 默认 最新

  • douwen3836 2011-09-03 09:22
    关注

    No - it's impossible for PHP to ever get hold of that file if it is too big.

    You would have to use client-size resizing, which is possible using Flash- or Java-based uploaders:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部