[Docker] Display only containers’ name

Normally, the command ‘docker ps -a’ allows display all the informations of docker, but if we want only the names of containers, we can do like this :

docker ps --format '{{.Names}}'

[PHP] get zip file when visiting browser

With Apache + PHP
This code allows us to download a file zip from browser:


    $your_zip_file = "/path/to/your_zip_file.zip";

    $file_name = basename($yourfile);

    header("Content-Type: application/zip");
    header("Content-Disposition: attachment; filename=$file_name");
    header("Content-Length: " . filesize($your_zip_file ));

    readfile($your_zip_file );