I know that there are other questions similar to this, but I couldn't find the solution in it.
I am using absolute local pdf file and I want to use file_get_contents()
function. My code:
$fileName = 'C:/Users/my_user/Desktop/thisispdf.pdf';
$content = file_get_contents($fileName);
The thing is that it says that the file is not found. When I put it the filename into file explorer, the pdf opens up immediately. I also was trying to change the slashes from /
to \
and even use \\
, but none of these helped.
What I am missing here?