ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

Functions | Variables
upload.php File Reference

Go to the source code of this file.

## Functions
foreach($extension_whitelist as $extension) if(!$is_valid_extension) if(!@move_uploaded_file($_FILES[$upload_name]["tmp_name"], $save_path.$file_name)) | HandleError ($message)

## Variables
| $POST_MAX_SIZE = ini_get('post_max_size')
| $unit = strtoupper(substr($POST_MAX_SIZE, -1))
| $multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1)))
if((int)@$_SERVER['CONTENT_LENGTH'] > $multiplier *(int)$POST_MAX_SIZE &&$POST_MAX_SIZE) global | $save_path
| $upload_name = "Filedata"
| $max_file_size_in_bytes = 2147483647
global | $extension_whitelist
| $valid_chars_regex = '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'
| $MAX_FILENAME_LENGTH = 260
global | $file_name = ""
| $file_extension = ""
| $uploadErrors
if(!isset($_FILES[$upload_name])) else if(isset($_FILES[$upload_name]["error"])&&$_FILES[$upload_name]["error"]!=0) else if(!isset($_FILES[$upload_name]["tmp_name"])||!@is_uploaded_file($_FILES[$upload_name]["tmp_name"])) else if(!isset($_FILES[$upload_name]['name'])) | $file_size = @filesize($_FILES[$upload_name]["tmp_name"])
global | $original_file_name = $file_name
if(strlen($file_name)==0||strlen($file_name) > $MAX_FILENAME_LENGTH) | $path_info = pathinfo($_FILES[$upload_name]['name'])
| $is_valid_extension = false

## Function Documentation

foreach ($extension_whitelist as $extension) if (!$is_valid_extension) if (!@move_uploaded_file($_FILES[$upload_name]["tmp_name"], $save_path.$file_name)) HandleError | ( |  | $message | ) |

Definition at line 196 of file upload.php.

{
echo $message;
}

## Variable Documentation

global $extension_whitelist

Definition at line 77 of file upload.php.

$file_extension = ""

Definition at line 85 of file upload.php.

$file_name = ""

Definition at line 83 of file upload.php.

if (!isset($_FILES[$upload_name])) else if (isset($_FILES[$upload_name]["error"])&&$_FILES[$upload_name]["error"]!=0) else if (!isset($_FILES[$upload_name]["tmp_name"])||!@is_uploaded_file($_FILES[$upload_name]["tmp_name"])) else if (!isset($_FILES[$upload_name]['name'])) $file_size = @filesize($_FILES[$upload_name]["tmp_name"])

Definition at line 111 of file upload.php.

$is_valid_extension = false

Definition at line 151 of file upload.php.

$max_file_size_in_bytes = 2147483647

Definition at line 75 of file upload.php.

$MAX_FILENAME_LENGTH = 260

Definition at line 82 of file upload.php.

$multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1)))

Definition at line 63 of file upload.php.

$original_file_name = $file_name

Definition at line 129 of file upload.php.

if (strlen($file_name)==0||strlen($file_name) > $MAX_FILENAME_LENGTH) $path_info = pathinfo($_FILES[$upload_name]['name'])

Definition at line 149 of file upload.php.

$POST_MAX_SIZE = ini_get('post_max_size')

Definition at line 61 of file upload.php.

if ((int)@$_SERVER['CONTENT_LENGTH'] > $multiplier *(int)$POST_MAX_SIZE &&$POST_MAX_SIZE) global $save_path

Definition at line 65 of file upload.php.

$unit = strtoupper(substr($POST_MAX_SIZE, -1))

Definition at line 62 of file upload.php.

$upload_name = "Filedata"

Definition at line 74 of file upload.php.

$uploadErrors

Initial value:
array(
0=>"There is no error, the file uploaded with success",
1=>"The uploaded file exceeds the upload_max_filesize directive in php.ini",
2=>"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form",
3=>"The uploaded file was only partially uploaded",
4=>"No file was uploaded",
6=>"Missing a temporary folder"
)

Definition at line 86 of file upload.php.

$valid_chars_regex = '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'

Definition at line 79 of file upload.php.