<?php isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = ''; $params = explode('/', $q); $action = $params[0]; $elementFichier = $params[1]; function htmldecode($value){ $value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8'); return $value; } //Traitement switch ( $action ) { case 'csv': break; case 'xml': break; }