JediKNight
04-07-2002, 02:06 AM
I think of a small modification (since I am very new to PHP, i don't want to call it a hack yet :D) to let user view the attachment nicely on a page with a layout..
I commented out the if at the end of attachment.php and the echo command, to insert this:
header("Content-type:text/html");
$pointer=fopen("$attachmentinfo[filename]", "a+");
fwrite ($pointer,$attachmentinfo[filedata]);
fclose($pointer);
print <<<END
You're viewing attachment from $bbtitle
<img src="$attachmentinfo[filename]">
END;
but it took the server too long to write the file and show the html with the picture.. and guess what.. the image actually showed up but was totally corrupted.. so bad that was beyond recognization..
there is no way to overcome that?
Jedi
I commented out the if at the end of attachment.php and the echo command, to insert this:
header("Content-type:text/html");
$pointer=fopen("$attachmentinfo[filename]", "a+");
fwrite ($pointer,$attachmentinfo[filedata]);
fclose($pointer);
print <<<END
You're viewing attachment from $bbtitle
<img src="$attachmentinfo[filename]">
END;
but it took the server too long to write the file and show the html with the picture.. and guess what.. the image actually showed up but was totally corrupted.. so bad that was beyond recognization..
there is no way to overcome that?
Jedi