NYCPHP Meetup

NYPHP.org

[nycphp-talk] Double Loading PHP as image - Firefox or PHP?

Wellington Fan wfan at encogent.com
Wed Nov 30 20:42:01 EST 2005


I meant to mention that I also ran this:

<?php
$fd = fopen($_SERVER['DOCUMENT_ROOT'] . '/hitcounts.txt','a+');
fwrite( $fd, date('r') . ' | ' . $_SERVER['HTTP_USER_AGENT'] . "\n" );

header('Content-Type: image/gif');
header('Content-Disposition: inline; filename=count.gif');
readfile ($_SERVER['DOCUMENT_ROOT'] . '/images/and.gif');
?>


*wihtout* the Content-Disposition header:

<?php
$fd = fopen($_SERVER['DOCUMENT_ROOT'] . '/hitcounts.txt','a+');
fwrite( $fd, date('r') . ' | ' . $_SERVER['HTTP_USER_AGENT'] . "\n" );

header('Content-Type: image/gif');
readfile ($_SERVER['DOCUMENT_ROOT'] . '/images/and.gif');
?>

all good.



More information about the talk mailing list