From: csnaitsirch at web dot de Operating system: Debian/Linux PHP version: 5.2.8 PHP Bug Type: Feature/Change Request Bug description: Class for easier sending HTTP Headers
Description: ------------ In my opinion it is difficult to send special HTTP headers. If you create a File programaticly and want to send it to the user, you have to use something like: <?php header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"file.csv\""); header("Content-Length: ".strlen($csv)); ?> So I have written some classes to make it easier. The same result of the upper example will be reached with the following: <?php $h = new HTTPHeader(); $h->ContentType()->ApplicationOctetStream(); $h->ContentDisposition()->Attachment()->Filename("file.csv"); $h->ContentLength($csv); ?> If you think it would be a helpful class mail me. -- Edit bug report at http://bugs.php.net/?id=47195&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47195&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47195&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47195&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47195&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47195&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47195&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47195&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47195&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47195&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47195&r=support Expected behavior: http://bugs.php.net/fix.php?id=47195&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47195&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47195&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47195&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47195&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47195&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47195&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47195&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47195&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47195&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47195&r=mysqlcfg