I am trying to display PDF's using PHP which are stored in a folder named uploads which is located in the same folder with my php file .
this is the code I tried: (aa is the name of the pdf file)
$file1 = '\uploads\aa.php';
header('Content-type: application/pdf');
header('Content-Disposition : inline; filename="' . $file1 . '"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
@readfile($file1);
but I get a server error :
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
is there any soluion for this?