private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'doc' => 'application/msword', 'docx' => 'application/msword', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'doc' => 'application/msword', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'docx' => 'application/msword', /*ligne ajouter*/ 'doc' => 'application/msword', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'doc' => 'application/msword', 'docx' => 'application/msword', /*ligne ajouter*/ 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
'jpg' => 'image/jpeg',ou encore
'jpeg' => 'image/jpeg',
/* Video */
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
get_allowed_extensions()
private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'doc' => 'application/msword', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'doc' => 'application/msword1', /*ligne modifiée*/ 'docx' => 'application/msword', /*ligne ajoutée*/ 'xls' => 'application/vnd.ms-excel1', /*ligne modifiée*/ 'xlsx' => 'application/vnd.ms-excel', /*ligne ajoutée*/ 'ppt' => 'application/vnd.ms-powerpoint1', /*ligne modifiée*/ 'pptx' => 'application/vnd.ms-powerpoint', /*ligne ajoutée*/ /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question$allowed_extensions = $this->get_allowed_extensions(); var_dump($allowed_extensions);
private $allowed_extensions = array( /* Archives */ 'zip' => 'application/zip', '7z' => 'application/octet-stream', /* Documents */ 'txt' => 'text/plain', 'pdf' => 'application/pdf', 'doc' => 'application/msword1', 'docx' => 'application/msword', 'xls' => 'application/vnd.ms-excel1', 'xlsx' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint1', 'pptx' => 'application/vnd.ms-powerpoint', 'odt' => 'applivation/oowriter', /* Executables */ 'exe' => 'application/octet-stream', /* Images */ 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', /* Audio */ 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', /* Video */ 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo' );
private function set_allowed_extensions($allowed_extensions = array()) { $defaults = $this->get_allowed_extensions(); $allowed_extensions = array_unique($this->chip_parse_args($allowed_extensions, $defaults)); $this->allowed_extensions = $allowed_extensions; }
private function set_allowed_extensions($allowed_extensions = array()) { $defaults = $this->get_allowed_extensions(); $allowed_extensions = $this->chip_parse_args($allowed_extensions, $defaults); $this->allowed_extensions = $allowed_extensions; }