Summary: Writing a mail system or mailing list program is a big branch of PHP application, while PHP provides a simple function for sending emails, in practice it involves sending mail with attachments, testing the validity of the email address that
Mime everything starts with a bad browser and it doesn't support XHTML at all.
What is MIME Type?
Why do you say that? First, we need to understand how the browser handles content. The content displayed in the browser is HTML, XML, GIF, and
Mime_content_type: the MIME type of the specified object is returned,Usage: The code is as follows:Copy code Echo mime_content_type ('php.gif '). "n ";Echo mime_content_type ('test. Php '); Output:Image/gifText/plainHowever, this function will
how PHP Gets the file MIME type
1. Using the Mime_content_type method
String Mime_content_type (String $filename) Returns the MIME content type for a file as determined by using information f Rom the magic.mime file.
However, this method was
PHP exactly gets the file MIME type method,
The example in this article describes how PHP gets the file MIME type exactly. Share to everyone for your reference. The implementation method is as follows:
' application/pdf ', ' xml ' = '
Mime "OK, how do I create MIME-compliant information?" "With the general description above, let's take a look at what the so-called MIME information is!"
The simplest MIME information
This information does not have any paragraph, namely, has no
I wrote an upload file page, the same file, the same Chrome (47.0.2526.106 m), uploaded files under Windows 8.1
$_FILES['myFile']['type']is accurate, such as a Word document with a value
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
Background:Version php-5.3 No API to view the file's Mime_type, so you need to compile the extension fileinfo to extend the PHP API (finfo_* series functions). This issue will not exist in the official release package that php-5.3 will pull FileInfo
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.