Thread: UpLoads

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    11
    Rep Power
    0
    I have a problem when I try to make an upload,

    My PHP server it's with safe mode on, so I read that making a file:

    #!/bin/bash
    cp $1 $2
    And I call it "copy" on /tmp directory

    And then, to copy de uploaded file I make system("/tmp/copy $file /hosting/testing");
    BUT IT DOESN'T WORK, WHY???
    Does anyone know another way to copy uploaded files from the /tmp???
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    43
    Rep Power
    15
    When you get $file from the upload the filename will be strange indeed. Here's how I do this in PHP:

    copy($file, "mydir/$file_name");
    unlink($file);

    of course the mydir directory should have a chmod of
    777 or something like that. Unless you have your own server and are root.


    ------------------
    lhallusa
    webpatron.com

Similar Threads

  1. Replies: 1
    Last Post: February 8th, 2004, 02:59 PM
  2. Large file uploads (100MB) with PHP/Oracle
    By pablo.gosse in forum PHP Development
    Replies: 2
    Last Post: March 19th, 2003, 05:01 PM
  3. Handling Large file uploads with PHP
    By epp_b in forum PHP Development
    Replies: 6
    Last Post: November 7th, 2002, 08:56 PM
  4. multi forms and uploads
    By ChrisF in forum Perl Programming
    Replies: 4
    Last Post: September 23rd, 2002, 12:51 PM
  5. Anyone done file uploads with JSP?
    By coach in forum Java Help
    Replies: 0
    Last Post: November 1st, 2001, 01:01 PM

IMN logo majestic logo threadwatch logo seochat tools logo