/** * Test HttpResponse. */ function test_HttpResponse() { HttpResponse::setCache(true); HttpResponse::setContentType('application/pdf'); HttpResponse::setContentDisposition("test.pdf", false); HttpResponse::setFile('sheet.pdf'); HttpResponse::send(); }
<?php HttpResponse::setCacheControl('public'); HttpResponse::setCache(true); HttpResponse::capture(); print "This will be cached until content changes!\n"; print "Note that this approach will only save the clients download time.\n";