gestion des chemins de fichier sans types
This commit is contained in:
parent
af369ce2d8
commit
5871af0979
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$file = $_REQUEST['q'];
|
$file = $_REQUEST['q'];
|
||||||
$type = $_REQUEST['type'];
|
$type = $_REQUEST['type'];
|
||||||
|
if(!empty($type)){
|
||||||
switch($type){
|
switch($type){
|
||||||
case 'pdf':
|
case 'pdf':
|
||||||
$content_type = 'application/pdf';
|
$content_type = 'application/pdf';
|
||||||
@ -26,6 +27,9 @@ switch($type){
|
|||||||
break;
|
break;
|
||||||
default: exit; break;
|
default: exit; break;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
$path = PATH_DATA.'/';
|
||||||
|
}
|
||||||
$firephp->log($path.$file, 'path');
|
$firephp->log($path.$file, 'path');
|
||||||
if(file_exists($path.$file))
|
if(file_exists($path.$file))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user