Modification pour test
This commit is contained in:
parent
1cc0ccd569
commit
2d9c35cd10
@ -25,15 +25,19 @@ $file = $idObject.'.pdf';
|
||||
|
||||
//Le fichier n'existe pas alors on le télécharge
|
||||
if(!file_exists(PATH_DATA.'/'.$directory.'/'.$file)
|
||||
&& filesize(PATH_DATA.'/'.$directory.'/'.$file)==0
|
||||
&& date('Ymd', filemtime(PATH_DATA.'/'.$directory.'/'.$file))!=date('Ymd') )
|
||||
|| filesize(PATH_DATA.'/'.$directory.'/'.$file)==0
|
||||
|| date('Ymd', filemtime(PATH_DATA.'/'.$directory.'/'.$file))!=date('Ymd') )
|
||||
getMarques($idObject, PATH_DATA.'/'.$directory);
|
||||
|
||||
//On affiche le fichier en vérifiant qu'il existe
|
||||
if(file_exists(PATH_DATA.'/'.$directory.'/'.$file) && filesize(PATH_DATA.'/'.$directory.'/'.$file)>0)
|
||||
{
|
||||
//On affiche le fichier
|
||||
header("Content-Type: application/pdf");
|
||||
header("Pragma: public");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
//header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: must-revalidate");
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Disposition: inline; filename=\"$file\"");
|
||||
print file_get_contents(PATH_DATA.'/'.$directory.'/'.$file);
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user