PHP Classes

File: upload-01.php

Recommend this page to a friend!
  Classes of Krzysztof Kardasz  >  Nweb Image  >  upload-01.php  >  Download  
File: upload-01.php
Role: Example script
Content type: text/plain
Description: Example
Class: Nweb Image
Perform several image manipulation operations
Author: By
Last change:
Date: 15 years ago
Size: 1,387 bytes


Class file image Download
 * Nweb Extension Script
 * Example
 * @category Nweb
 * @package Nweb_Scripts
 * @author Krzysztof Kardasz
 * @copyright Copyright (c)

include 'lib/Image.php';

try {

$upload = new ImageUpload();

#upload(string|array nazwy indeksów plików <input name="indeks" )

#uploadSave ([string katalog docelowy,] [string nazwa pliku,] [boolean automatyczna zmiana nazw,] [int start numerowania])
$upload->uploadSave ('uploads/');


$Messages = implode('<br />', $upload->GetMessages ());

catch (
ImageUploadException $e)

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ImageUpload - 01</title>
<h3><?php echo (!empty($Messages)) ? $Messages : 'Upload zdjęć'; ?></h3>
<form enctype="multipart/form-data" action="" method="post">
    <input name="obraz" type="file" />
 <input type="submit" name="submit" value="Upload" />