I have some '.mht' files. I need to upload that file in to my word press site. but when i upload that files, its showing "HTTP ERROR" Error.

Is there any other way to upload '.mht' files to word press site.

有帮助吗?

解决方案

You can Upload Additional File Types To Your WordPress Blog using the below code here.

 <?php
 add_filter('upload_mimes', 'custom_upload_mimes');
 function custom_upload_mimes ( $existing_mimes = array() ) {
 // add your extension to the array
 $existing_mimes['ppt'] = 'application/vnd.ms-powerpoint';
 // or: $existing_mimes['ppt|pot|pps'] = 'application/vnd.ms-powerpoint';
 // to add multiple extensions for the same mime type
 // add as many as you like
 // removing existing file types
 unset( $existing_mimes['exe'] );
 // add as many as you like
 // and return the new full result
 return $existing_mimes;
 }
 ?>

So you can add your file formats in this way by using the above code
For more info Regarding this issue visit this link..
Default file formats that supports for word press is here..

其他提示

add this in your function.php

function custom_upload_mimes ( $existing_mimes=array() ) {

    $existing_mimes['mht'] = 'multipart/related';

    return $existing_mimes;

}
add_filter('upload_mimes', 'custom_upload_mimes');
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top