- basename: documentation ( source)
- readfile: documentation ( source)
- print_r: documentation ( source)
- header: documentation ( source)
<?php
class abc{
protected const A = [1, 2, 3];
public static function abcd(){
return abc::A;
}
}
print_r(abc::abcd());
$file_url = 'http://www.javatpoint.com/f.txt';
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: utf-8");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
readfile($file_url);