Test chemin de fichier
This commit is contained in:
parent
5833539e37
commit
ace8763c1d
@ -319,10 +319,10 @@ class FichierController extends Zend_Controller_Action
|
||||
$directory = realpath($configuration->path->data).'/bodacc';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Construire le chemin du dossier
|
||||
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
|
||||
print_r($matches); exit;
|
||||
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
|
||||
$directory.= '/'.$matches[1].'/'.$matches[2].'/'.$matches[3];
|
||||
$output_file = $directory.'/'.$file;
|
||||
echo $output_file; exit;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
|
Loading…
x
Reference in New Issue
Block a user