0

I've files with name file_#.pdf and index.php

Code:

echo "<a href='http://php.loc/file_#.pdf'>Link</a><hr>";
var_dump(file_get_contents("file_#.pdf"));

In this case function file_get_contents() found the file but when I click to create a link with tag <a> in the browser then get error with message:

Object not found

How I can fix this problem and download files with links correctly?

Doktor OSwaldo
  • 5,732
  • 20
  • 41
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125

0 Answers0