- <?php
- //properties of uploader\\
- $name = $_FILES["myfile"] ["name"];
- $type = $_FILES["myfile"] ["type"];
- $size = $_FILES["myfile"] ["size"];
- $temp = $_FILES["myfile"] ["tmp_name"];
- $error = $_FILES["myfile"] ["error"];
- if ($error > 0)
- die("Error File could not be uploaded Code $error.");
- else
- {
- if ($type = "video/avi" || $size > 50000000) //default blocks file type .avi and file upload limit 40 mb
- {
- die ("file format or size error");
- }
- else
- {
- move_uploaded_file($temp,"/Uploaded".$name);
- echo "File upload Completed";
- }
- ?>
You can easily imliment this into a cms such as dynasty this is a basic code with no upload limit so be aware of that before you put into your website.
///DOWNLOAD\\\
http://www.mediafire.com/file/mnmtozxu0 ... module.rar
///CODE\\\
upload.php
Index.php
- <html>
- <center><h1>Upload a file...</h1>
- <form action='upload.php' method='post' enctype='multipart/form-data'>
- <input type='file' name='myfile'><p>
- <input type='submit' name='Upload'>
- </form></center>
- </html>
just thought that i would make a post because ive been busy for a while and havent posted enjoy.