i got an error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in E:\Apache2\htdocs\xunknowntears\admin\img_upload.php on line 21
with this code for uploading images:
<?php
if ( isset ( $_FILES['fupload'] ) )
{
print "name: ". $_FILES['fupload']['name'] ."<br>";
print "size: ". $_FILES['fupload']['size'] ."<br>";
print "temp name: ". $_FILES['fupload']['tmp_name'] ."<br>";
print "type: ". $_FILES['fupload']['type'] ."<br>";
print "error: ". $_FILES['fupload']['error'] ."<br>";
if ( $_FILES['fupload']['type'] == "image/gif' )
{
$source = $_FILES['fupload']['tmp_name'];
$target = "../pictures/".$_FILES['fupload']['name'];
move_uploaded_file( $source, $target ); // or die ("Couldn't Copy");
$size = getImageSize( $target );
$imgstr = "<p><img width=\"$size[0]\" height=\"$size[1]\" src=\"$target\" alt=\"Uploaded Image\" ></p>";
print $imgstr;
}
}
?>
I looked it over for about 2 hours and only found small typo's that were causing previous errors, but i cant find the one that causes this one. all mt tmp dirs are at the defauls in the php.ini file. i even looked it over some more in my PHP book. but still no result, any ideas?
Longbow