PHP Classes

File: upload.php

Recommend this page to a friend!
  Classes of Mehmet Kidiman  >  Developbat PHP CRUD  >  upload.php  >  Download  
File: upload.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Developbat PHP CRUD
Show pages to manage table records using Bootstrap
Author: By
Last change:
Date: 1 year ago
Size: 435 bytes
 

Contents

Class file image Download
<?php
include('config.php');
//var_dump($_POST);
$allimages = '';
if(
$_FILES["file"]["name"] != '')
{
   
$test = explode('.', $_FILES["file"]["name"]);
   
$ext = end($test);
   
$name = rand(10000, 99999999) . '.' . $ext;
   
$location = 'uploads/' . $name;
   
move_uploaded_file($_FILES["file"]["tmp_name"], $location);
  
// echo '<img src="'.$location.'" height="150" width="225" class="img-thumbnail" />';
   
echo $location;

}

For more information send a message to info at phpclasses dot org.