application/x-www-form-urlencoded Multipart/form-data Text/plainWhy add a property to the form that uploads the file enctype the format type of the data response returned by the backgroundUpload a file in the form to add attributes Enctype=
Iis|mime| Tricks MIME (Multipurpose Internet Mail Extensions, multi-purpose Internet Message extensions) is created for e-mail exchange, network documentation, And the specification of file formats in the enterprise network and other applications on
: This article mainly introduces the role of MIMEtypes in nginx. For more information about PHP tutorials, see. The relationship between MIME-type and Content-Type:
When the web server receives a static resource file request, it finds the
Maybe you may wonder why the 404 error "this page cannot be found" always occurs when I upload FLV or MP4 files to the server and enter the correct address to access the file through HTTP? This indicates that MP4 files cannot be identified by the
The solution is as follows, similar to other frameworks.Source code (/system/libraries/upload. php 199 line)$ This-> file_type = preg_replace ("/^ (. + ?);. * $/"," \ 1 ", $ _ FILES [$ field] ['type']);To:Copy codeThe Code is as follows:// Edit By
List of MIME types arranged by content type
Type/subtype
Extension
Application/envoy
Evy
Application/fractals
Fif
Application/futuresplash
SPL
Application/HTA
HTA
Open the Web. xml file in the conf folder.
For example:
PPT application/vnd. MS-PowerPoint
RAR application/X-Rar-compressed MMAP application/mindmanager
You can configure the Mimi type as shown in the preceding example.
The solution is as follows, similar to other frameworks.
Source code (/system/libraries/upload. php 199 line)
$ This-> file_type = preg_replace ("/^ (. + ?);. * $/"," \ 1 ", $ _ FILES [$ field] ['type']);
To:
Copy codeThe Code is as follows: //
I'm messy, too.PS: In the
finfo_file($finof,basename($this->filePath))
I tested it before.
finfo_file($finof,$this->filePath)
Just trying to print, that's not the problem.
Reply content:
I'm messy, too.PS: In the
If your computer, the web server is IIS
IIS -- default website Property --> HTTP header --> mime ing --> file type --> New Type
. WML text/vnd. WAP. WML
. Wmlc application/vnd. WAP. wmlc
. WMLS text/vnd. WAP. WMLScript
. Wmlsc application/vnd. WAP.
This array contains common MIME types, and if you need to do a file download, you can view the file extension from this array to determine if you can download
$mime _types = Array ("323" = "text/h323",
"Acx" =
When uploading a picture, use Ajax to commit and return the data in JSON format. In the test found in IE browser, after uploading the picture, not showing the picture, but pop up a hint: whether to save the Uploadimg.json file, and in other browsers
The example in this article describes how PHP gets file MIME types. Share to everyone for your reference. Specifically as follows:
1. Using the Mime_content_type method
String Mime_content_type (String $filename)
Returns the MIME
The examples in this article describe how PHP accurately obtains file MIME types. Share to everyone for your reference. The implementation method is as follows:
' application/postscript ', ' eps ' => ' application/post Script ', ' exe ' => '
The solution is as follows, and the other frameworks are identical.
Source code (/system/libraries/upload.php 199 line)
$this->file_type = preg_replace ("/^" (. +?);. *$/"," \\1 ", $_files[$field] [' type ']);
Modified as follows:
Copy
What is the MIME type, which is the type of file that sets an extension to open with an application, and when the file is accessed, the browser automatically opens with the specified application.Used to specify some client-defined file names and how
Introduction to Linux file commands:
This command is used to identify file types and to identify the encoding format of some files. It gets the file type by looking at the header information of the file, not as if Windows determines the file type
ServerRoot "/usr/local"
ServerRoot is used to specify the running directory of the daemon httpd, httpd will automatically change the current directory of the process to this directory after it is started, so if the file or directory specified in the
I am also messy. the {code...} in PS: was tested by me {code...} and printed randomly. The problem is not that
I am also messy,PS: Medium
Finfo_file ($ finof, basename ($ this-> filePath ))
Yes, I tested it before.
Finfo_file ($ finof, $
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.