Hi there,
I'm getting hte following error
Parse error: syntax error, unexpected T_VARIABLE in xxx on line 3
the file is this one...
<? php
$file_ref = $_REQUEST['img_ref'];
if(file_exists($file_ref))
{
$tipe = getimagesize($file_ref);
$header_ext = ($tipe[2] < 4) ? ($tipe[2] < 3) ? ($tipe[2] < 2) ? ($tipe[2] < 1) ? NULL : 'gif' : 'jpeg' : 'png' : NULL;
if($header_ext !== NULL)
{
header("Content-type: image/" .$header_ext);
readfile($file_ref);
}
}
?>
and even if i change it to this:
<? php
$fileref = '/images/pic_001.jpg';
header("Content-type: image/jpeg");
readfile($fileref);
?>
i still get the same error...
can anyone advise why this might happen?