Here's a little script that I'm having problems getting to run, and I was wondering if anybody saw the problem offhand:
[index.html]
<html>
<body>
<form enctype='multipart/form-data' method='post' action='saver.php'>
<input type='hidden' name='MAX_FILE_SIZE' value='2000'>
<input type='file' name='newimg'>
<input type='submit' name='submit' value='Upload'>
</form>
</body>
</html>
[saver.php]
<?
copy($newimg,"/example/images/".$newimg_name);
header("Location: index.html");
?>
(the images directory is chmoded 777)
It works on my windows 2000 machine, but in XP or redhat8, it returns an error:
'Cannot open '' for reading...' implying that the image isn't actually being sent over post. However, if I do a simple:
if($newimg_name)
{
print($newimg_name);
}
it prints the name of the file. Sooo... what's up?