Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Upload

Status
Not open for further replies.
Jun 19, 2001
86
US
I need a very simple script that I can use to upload images to a directory on a Unix server. I have tried:

$image_dir = "/mywebsite/imagedir/uploads/";
$upload_image = param('photo');
open (UPLOADIMAGE, ">>$image_dir");
while ($bytesread=read($upload_image,$buffer,1024))
{
print UPLOADIMAGE $buffer;
}

but it doesn't work. Any help would be greatly appreciated.


Please pray for our country and it's leaders.
 
Please see faq219-406. It gives a complete anotated example of this trick. Please use descriptive titles and check the FAQs.
And, beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top