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

    Join Date
    Jul 2000
    Posts
    27
    Rep Power
    0
    I wrote a php script to upload 2 images to a directory on my website. In the html form i used this:

    <form action=toevoegen.php method=get enctype='multipart/form-data'>
    <td><p class=normal>Image outside:</td>");
    <td><input type=file size=25 name=userfile[]></td>
    <td><p class=normal>Image inside:</td>
    <td><input type=file size=25 name=userfile[]></td>
    </form>

    In the upload script i used this:
    if ($userfile_name[0] != NULL):
    $dest[0] = 'fotos/'.$userfile_name[0];
    copy( $userfile[0], $dest[0] );
    endif;

    if ($userfile_name[1] != NULL):
    $dest[1] = 'fotos/'.$userfile_name[1];
    copy( $userfile[1], $dest[1] );
    endif;

    I selected two files on my computer, the 're in the dir d:websitesweboimages
    The result on internet is the following:

    Warning: Unable to open 'D:WebsitesWeboImagesafkortzaag.jpg' for reading: No such file or directory in /www/www.twente-online.nl/poortman/toevoegen.php on line 10

    Warning: Unable to open 'D:WebsitesWeboImagesbalken.jpg' for reading: No such file or directory in /www/www.twente-online.nl/poortman/toevoegen.php on line 15

    Whats going wrong?
    I made this script on my linux system at home (apache, php4, mysql 3.22) and it worked! But when i put it on the server of my ISP (also linux) this where the failures.

    Thank you in advance
    Pieter

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

    Join Date
    Jul 2000
    Posts
    27
    Rep Power
    0
    Hi Pieter:

    It seems to me that the error is in path direction. Try debugging the variable dest[], because the error message is saying that the server is searching the upload path for the intended file before the file is ever sent to the server.

    ...or it could be as simple as adding this one line:

    $userfile=stripslashes($userfile);

    ...try adding that to the processing page.

    //ryan

    [This message has been edited by snoop logy dogg (edited September 16, 2000).]

Similar Threads

  1. windows XP chkdsk and file system problems
    By wey97 in forum Windows Help
    Replies: 26
    Last Post: August 3rd, 2005, 12:37 AM
  2. Popup problems from Flash in IE6
    By jmichels in forum Flash Help
    Replies: 19
    Last Post: January 6th, 2004, 04:27 PM
  3. perl newb having mailer script problems...
    By mrmin123 in forum Perl Programming
    Replies: 0
    Last Post: October 7th, 2003, 02:15 AM
  4. Replies: 0
    Last Post: August 26th, 2003, 08:50 PM
  5. Windows problems
    By Known_criminal in forum Windows Help
    Replies: 0
    Last Post: August 23rd, 2003, 08:23 PM

IMN logo majestic logo threadwatch logo seochat tools logo