PHP Classes

File: upload.php

Recommend this page to a friend!
  Classes of Hasan Yasar   Upload Class   upload.php   Download  
File: upload.php
Role: Example script
Content type: text/plain
Description: Upload Example PHP
Class: Upload Class
File upload handling with image rescaling support
Author: By
Last change:
Date: 19 years ago
Size: 1,496 bytes


Class file image Download
include "";

// Defining Class
$yukle = new upload;

// Set Max Size

// Set Directory

// Do not change
// Set Temp Name for upload, $_FILES['file']['tmp_name'] is automaticly get the temp name

// Do not change
// Set file size, $_FILES['file']['size'] is automaticly get the size

// Do not change
// Set File Type, $_FILES['file']['type'] is automaticly get the type

// Set File Name, $_FILES['file']['name'] is automaticly get the file name.. you can change

// Start Copy Process

// If uploaded file is image, you can resize the image width and height
// Support gif, jpg, png

// Control File is uploaded or not
// If there is error write the error message

// Set a thumbnail name

// create thumbnail

// change thumbnail size
$yukle->set_thumbnail_size(0, 250);

$yukle->set_thumbnail_size(50, 0);

$yukle->set_thumbnail_size(62, 150);