plz help...

Discussion in 'PHP' started by suryaphp, Mar 15, 2009.

  1. #1
    hiii..
    am new in php...
    i want to move an uploaded file to a directory in flash media server..plz help me vth the php code to do dat...giving dir path in move_uploaded_file() is not working...thanks in advance...
     
    suryaphp, Mar 15, 2009 IP
  2. CGSS-CyberGeek

    CGSS-CyberGeek Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    CGSS-CyberGeek, Mar 16, 2009 IP
  3. Sw00p

    Sw00p Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    move_uploaded_file is the right function...be sure to use the right filename, destination. and don't forget you need the rights to write the file...

    check

    http://de.php.net/manual/de/function.move-uploaded-file.php

    for more information!
     
    Sw00p, Mar 16, 2009 IP
  4. Stylesofts

    Stylesofts Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hello,

    Before uploading a file in a web server..you have to make sure to change the permission of that the folder where you upload your images or files.

    To change the permission through ftp:

    login to the ftp and right click on the folder whose permission you need to change..

    change the permission to 777


    Now here is code for the upload:

    
    $uploaddir='../yourfoldername;
    
    if(is_uploaded_file($_FILES['file']['tmp_name']))
    {
    copy($_FILES['file']['tmp_name'],$uploaddir.'/'.$_FILES['file']['name']);
    }
    
    
    PHP:
     
    Stylesofts, Mar 17, 2009 IP