PHP code example of cardinalby / content-disposition
1. Go to this page and download the library: Download cardinalby/content-disposition library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cardinalby / content-disposition example snippets
use cardinalby\ContentDisposition\ContentDisposition;
public static function create(
$fileName = null,
$fallback = true,
$type = 'attachment'
)
$v = ContentDisposition::create('£ and € rates.pdf')->format();
// 'attachment; filename="£ and ? rates.pdf"; filename*=UTF-8\'\'%C2%A3%20and%20%E2%82%AC%20rates.pdf'