--8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii On Fri, Mar 17, 2000 at 07:18:09AM -0700, Eric Samson wrote: > I am trying to upload files through a form, and trying to put them into > a temporary directory to transfer them to a permanent file... I have > the Wrox php book, and I am totally lost at this point... I guess there What is wrox? > is a default temp directory where this stuff is put, but I have no clue > how to determine where that is... Can anyone help? Thanks in advace > all.... > > This is what I coded: > > if ($file1) { > if (copy($file1,"/temp/$lname")) { > echo ("Photo 1 received: thank you!"); > } else { > echo ("Error saving photo 1. " . "However, your information > will still be processed."); > } > } > > if ($file2) { > if (copy($file2,"/temp/$lname")) { > echo ("Photo 2 received: thank you!"); > } else { > echo ("Error saving photo 2. " . "However, your information > will still be processed."); > > This is the warning: > > Warning: Unable to open 'none' for reading: No such file or directory in > /usr/local/apache/htdocs/php/adinfo_action.php3 on line 232 > Error saving photo 1. However, your information will still be processed. Well it looks like the name of the form field where you upload the file should be "lname". Check that; also check to make sure /temp exists (did you mean /tmp?) I'll attach a script that works for me, and the upload form to go with it. This is what I use to upload things to my home directory (and authentication is required, it's not for anonymous upload). -- _______ http://www.bigfoot.com/~ecloud (_ | |_) ecloud@bigfoot.com finger rutledge@cx47646-a.phnx1.az.home.com __) | | \__________________________________________________________________ Get money for spare CPU cycles at http://www.ProcessTree.com/?sponsor=5903 --8t9RHnE3ZwKMSgU+ Content-Type: text/html Content-Disposition: attachment; filename="upload.html"