[转载+整理]Wordpress上传文件类型限制解决办法

Wordpress 2.1 之前的版本修改 wp-includes/functions-post.php
Wordpress 2.1 之后的版本修改 wp-includes/functions.php

查找:

  1. function wp_check_filetype($filename, $mimes = null) {

在底下的$mimes里加入要添加的文件类型,例如 rar :

  1. 'rar' => 'application/rar',

不明白为啥wordpress开发组不将其作为后台自定义功能放开

参考资料:
http://www.iyoyo.org/posts/139.html
http://www.betalog.com/post/822.html

17fav 收藏本文
标签:,

相关日志 随机文章

Comments

One Response to “[转载+整理]Wordpress上传文件类型限制解决办法”

  1. fiseo on 2008-07-09 10:35 am

    不错!终于找到了上传文件的解决办法,马上就去实验一下。

    [Reply]

Leave a Reply




请输入验证码

Use "<coolcode></coolcode>" to publish your code.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

京ICP备05059555号

收藏 & 分享

Powered by 17fav.com