Home >Backend Development >PHP Problem >How to set php mime type

How to set php mime type

藏色散人
藏色散人Original
2020-07-21 11:00:184028browse

In PHP, you can use the "CURLFile::setMimeType" method to set the MIME type of the uploaded file. The syntax is "public CURLFile::setMimeType ( string $mime ) : void".

How to set php mime type

##CURLFile::setMimeType

(PHP 5 >= 5.5.0, PHP 7)

CURLFile::setMimeType — Set the MIME type of the uploaded file

Recommended: "

PHP Tutorial"

Instructions

public CURLFile::setMimeType ( string $mime ) : void

Parameters

mime

The MIME type in the POST data.

Return value

No return value.

The above is the detailed content of How to set php mime type. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn