php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
rfc1867.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef RFC1867_H
18#define RFC1867_H
19
20#include "SAPI.h"
21
22#define MULTIPART_CONTENT_TYPE "multipart/form-data"
23#define MULTIPART_EVENT_START 0
24#define MULTIPART_EVENT_FORMDATA 1
25#define MULTIPART_EVENT_FILE_START 2
26#define MULTIPART_EVENT_FILE_DATA 3
27#define MULTIPART_EVENT_FILE_END 4
28#define MULTIPART_EVENT_END 5
29
30/* Errors */
31#define PHP_UPLOAD_ERROR_OK 0 /* File upload successful */
32#define PHP_UPLOAD_ERROR_A 1 /* Uploaded file exceeded upload_max_filesize */
33#define PHP_UPLOAD_ERROR_B 2 /* Uploaded file exceeded MAX_FILE_SIZE */
34#define PHP_UPLOAD_ERROR_C 3 /* Partially uploaded */
35#define PHP_UPLOAD_ERROR_D 4 /* No file uploaded */
36#define PHP_UPLOAD_ERROR_E 6 /* Missing /tmp or similar directory */
37#define PHP_UPLOAD_ERROR_F 7 /* Failed to write file to disk */
38#define PHP_UPLOAD_ERROR_X 8 /* File upload stopped by extension */
39
43
51
57
65
71
75
77typedef void (*php_rfc1867_get_detect_order_t)(const zend_encoding ***list, size_t *list_size);
79typedef char* (*php_rfc1867_getword_t)(const zend_encoding *encoding, char **line, char stop);
80typedef char* (*php_rfc1867_getword_conf_t)(const zend_encoding *encoding, char *str);
81typedef char* (*php_rfc1867_basename_t)(const zend_encoding *encoding, char *str);
82
83SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler);
84
86extern PHPAPI zend_result (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra);
87
90 php_rfc1867_get_detect_order_t get_detect_order,
91 php_rfc1867_set_input_encoding_t set_input_encoding,
93 php_rfc1867_getword_conf_t getword_conf,
95
96#endif /* RFC1867_H */
#define SAPI_POST_HANDLER_FUNC(post_handler)
Definition SAPI.h:312
#define SAPI_API
Definition SAPI.h:39
basename(string $path, string $suffix="")
bool encoding_translation
Definition mbstring.h:97
#define PHPAPI
Definition php.h:71
int line
Definition php_ffi.h:54
xmlCharEncodingHandlerPtr encoding
Definition php_soap.h:170
PHPAPI zend_result(* php_rfc1867_callback)(unsigned int event, void *event_data, void **extra)
Definition rfc1867.c:53
char *(* php_rfc1867_getword_conf_t)(const zend_encoding *encoding, char *str)
Definition rfc1867.h:80
struct _multipart_event_file_end multipart_event_file_end
char *(* php_rfc1867_basename_t)(const zend_encoding *encoding, char *str)
Definition rfc1867.h:81
void(* php_rfc1867_set_input_encoding_t)(const zend_encoding *encoding)
Definition rfc1867.h:78
int(* php_rfc1867_encoding_translation_t)(void)
Definition rfc1867.h:76
struct _multipart_event_formdata multipart_event_formdata
PHPAPI void destroy_uploaded_files_hash(void)
Definition rfc1867.c:168
struct _multipart_event_start multipart_event_start
char *(* php_rfc1867_getword_t)(const zend_encoding *encoding, char **line, char stop)
Definition rfc1867.h:79
SAPI_API void php_rfc1867_set_multibyte_callbacks(php_rfc1867_encoding_translation_t encoding_translation, php_rfc1867_get_detect_order_t get_detect_order, php_rfc1867_set_input_encoding_t set_input_encoding, php_rfc1867_getword_t getword, php_rfc1867_getword_conf_t getword_conf, php_rfc1867_basename_t basename)
Definition rfc1867.c:1289
struct _multipart_event_file_data multipart_event_file_data
struct _multipart_event_end multipart_event_end
void(* php_rfc1867_get_detect_order_t)(const zend_encoding ***list, size_t *list_size)
Definition rfc1867.h:77
struct _multipart_event_file_start multipart_event_file_start
size_t post_bytes_processed
Definition rfc1867.h:73
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
int32_t zend_off_t
Definition zend_long.h:44
struct _zend_encoding zend_encoding
ZEND_RESULT_CODE zend_result
Definition zend_types.h:64