0

i try get_headers function of php but how can get size by path file in magento 2?

$url = 'http://www.example.com';

print_r(get_headers($url));
1

You can do it by using a directory path of the file along with below function of PHP.

$file = '/path/to/your/file';
$filesize = filesize($file);

Thanks

1
  • Thank you very much <3 – NewBie Jun 18 '19 at 5:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.