My host migrated a site of mine to a new server. Now, I can't POST any uploaded images anywhere... frustrating! I can't even echo $_FILES variables; they come out blank.
Here's the simplest of simple codes:
<?
if( isset( $_POST['submit'] ) ){
$date = time();
$name = $_FILES['file']['name'];
$temp = $_FILES['file']['tmp_name'];
echo( $temp."<br />" );
$dest = "images/".$date.".jpg";
if( copy( $temp,$dest ) ){
echo( "Copied...<br />" );
} else {
echo( "Not copied...<br />".$_FILES['file']['error'] );
}
}
?>
<form action="<?=$PHP_SELF?>" method="POST" enctype="multipart/form-data">
<input name="file" type="file" size="50" /> <input name="submit" type="submit" value="Submit" /></form>
No error message displays. I also tried $HTTP_POST_FILES without any success. Any ideas? Anyone?