Recommend this page to a friend! |
Download .zip |
Info | Example | View files (3) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2016-08-14 (2 months ago) | 68% | Total: 129 This week: 2 | All time: 8,315 This week: 591 |
Version | License | PHP version | Categories | |||
uploadclass 1.0.0 | Freely Distributable | 5 | HTTP, PHP 5, Files and Folders |
Description | Author | ||||||||
This package can validate and process an uploaded file. |
|
# INTRODUCTION # The **uploadclass** package is a class designed to simplified upload process # EXAMPLE # To use this class, you just need to see example file. In fact, you just have to do something like : <?php if(isset($_POST["Send"])){ // If form is submited require_once("uploadClass.php"); // Load uploadClass file once $file=$_FILES["fileField"]; // Get file from form $destination="Uploaded_Files/"; if (!file_exists($destination)) { // If 'destination' folder dosn't exist, create mkdir($destination); } $process=new Upload($destination); // Set 'destination' as new default destination folder for upload $uploadResult=$process->executeUpload($file); // Attach file to upload process echo $uploadResult; } ?> <form action="?" method="POST" enctype="multipart/form-data"> <table id="dyntable" class="table table-bordered"> <tr> <td> File </td> <td> <input type="file" name="fileField" id="fileField" placeholder=""> </td> </tr> <tr> <td colspan="2"> <center> <button type="submit" name="Send">Send</button> <button type="reset">Reinitialiser</button> </center> </td> </tr> </table> </form> # REFERENCE # ## public function setParameters($dest=null,$types=null) ## Set new destination (dest) and authorized file extensions list (types) ## public function executeUpload($uploaded_file,$destination=null) Get file and execute upload |
Files |
File | Role | Description |
---|---|---|
example.php | Example | Show how to use uploadclass |
readme | Doc. | Readme file |
uploadClass.php | Class | Full class description |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.