upload and content-type problems

From: Date: Fri, 09 Feb 2001 14:49:44 +0000
Subject: upload and content-type problems
Groups: php.general 
Request: Send a blank email to php-general+get-38949@lists.php.net to get a copy of this message
Hello All: I am using a simple script to upload files to allow users to upload files to a website. All of the various scripts I have tried basicaly use the recommendations from the PHP manual regarding file uploads. The user posts a file, which is temporarily held in the temp directory specified by php.ini and then the system copies the files to it's ultimate destination directory. Everything works great with one exception: All files that are uploaded get corrupted by adding the line: "Content-Type:something/whatever" and a blank line below it I am not sure what is causing this to be added to the files, php or apache but it is driving me nuts. As a desperate measure I use a shell script to whack the two top lines off every file after they are uploaded, but this seems absurd. Can anyone shed any light on this? Cheers, Jim

« previous php.general (#38949) next »