php – – iconv_set_encoding – Náhrada v PHP 5.6

  if (function_exists(‚iconv‚) and PHP_VERSION_ID < 50600){   iconv_set_encoding(‚internal_encoding‚, ‚UTF-8‚);   iconv_set_encoding(‚input_encoding‚, ‚UTF-8‚);   iconv_set_encoding(‚output_encoding‚, ‚UTF-8‚);}elseif (PHP_VERSION_ID >= 50600) {   ini_set(‚default_charset‚, ‚UTF-8‚);}

php – composer – Windows CLI instalace

  php -r „readfile(‚https://getcomposer.org/installer‘);“ > composer-setup.php php -r „if (hash(‚SHA384‘, file_get_contents(‚composer-setup.php‘)) === ’41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47′) { echo ‚Installer verified‘; } else { echo ‚Installer corrupt‘; unlink(‚composer-setup.php‘); } echo PHP_EOL;“ php composer-setup.php php -r „unlink(‚composer-setup.php‘);“

php – – Stažení souboru pomocí php

  header(‚Content-Description: File Transfer‘);header(‚Content-Type: application/octet-stream‘);header(‚Content-Disposition: attachment; filename=‘ . $fileName;header(‚Content-Transfer-Encoding: binary‘);header(‚Expires: 0‘);header(‚Cache-Control: must-revalidate, post-check=0, pre-check=0‘);header(‚Pragma: public‘);header(‚Content-Length: ‚ . filesize($file));ob_clean();flush();readfile($file);exit;