Home  >  Article  >  Backend Development  >  How to set mime in php

How to set mime in php

coldplay.xixi
coldplay.xixiOriginal
2020-10-08 13:57:143352browse

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 mime in php

##CURLFile::setMimeType

(PHP 5 >= 5.5.0, PHP 7)

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

Description

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

Parameters

mime

The MIME type in the POST data.

Return value

No return value.

If you want to know more about programming learning, please pay attention to the

php training column!

The above is the detailed content of How to set mime in php. 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