3/05/2010

File Uploading by php

Uploading Files to server is not so hard it's very simple.
$dir="images/";  // Give your server path where to upload
$uploaddir=$dir.basename($_FILES['f1']['name']); // to Give a new file name
if(move_uploaded_file($_FILES['f1']['tmp_name'],$uploaddir))
    {
    }

4 comments:

  1. what about giving writing permission to the uploading directory? chmod to 777?

    ReplyDelete
  2. uploading files for me is necessary to do the tasks and this way of uploading is simple.

    ReplyDelete
  3. Before read this article i don't know about upload a file is simply. Now file upload is easy for me.

    ReplyDelete
  4. Php is now very popular web language and we need uploading and downloading . Thats why this article is very much necesarry.

    ReplyDelete