CURLFile (class)

The CURLFile class

Introduction

(PHP 5 >= 5.5.0, PHP 7)

CURLFile should be used to upload a file with CURLOPT_POSTFIELDS.

Class synopsis

CURLFile {
/* Properties */
public $name ;
public $mime ;
public $postname ;
/* Methods */
public __construct ( string $filename [, string $mimetype [, string $postname ]] )
public string getFilename ( void )
public string getMimeType ( void )
public string getPostFilename ( void )
public void setMimeType ( string $mime )
public void setPostFilename ( string $postname )
public void __wakeup ( void )
}

Properties

name

Name of the file to be uploaded.

mime

MIME type of the file (default is application/octet-stream).

postname

The name of the file in the upload data (defaults to the name property).

See Also

Table of Contents

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/class.curlfile.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部