Thursday, 7 November 2013

File Upload in PHP

Hi there
Uploading file on server is a process of getting data from user. you cannot ignore it and every web developer needs upload file.php has some built in function which helps to upload file take a look on following line..
File up loader
Submit button
   $extnsn=end(explode(".", strtolower($_FILES['file']['name'])));
    if($extnsn=="rtf" || $extnsn=="doc" || $extnsn=="docx" || $extnsn=="txt" || $extnsn=="pdf")
                      $msg="Sorry ! Maximum upload file  size is  1024 KB";
                      $msg="Thanks for uploading  file";
                             echo $msg;