here is what i tried:
Code: Select all
<?
if($HTTP_POST_VARSї'action'] == "go"){
$uploaddir = "/usrimages";
$final_filename = "blah.jpg";
clearstatcache();
if(filesize($imgfile) < 8192 && imagesx($imgfile) <= 50 && imagesy($imgfile) <= 50){
$newfile = $uploaddir . "/" . $final_filename;
copy($imgfile, $newfile);
} else {
echo "File too big.";
}
} else {
?>
<form method="post" action="<?=$PHP_SELF;?>">
<input type="file" name="imgfile">
<input type="hidden" name="action" value="go">
<input type="submit">
</form>
<?
}
?>Warning: imagesx(): supplied argument is not a valid Image resource in /home/vexdev/public_html/image.php on line 10
Warning: imagesy(): supplied argument is not a valid Image resource in /home/vexdev/public_html/image.php on line 10
Warning: Unable to open 'F:\\3.gif' for reading: No such file or directory in /home/vexdev/public_html/image.php on line 12
is what i get... i realize this is probably very wrong.. but any suggestions on how i would approach this task?