[php] HEX to ASCII (%20, etc.)
Résolu
coccoweb
Messages postés
141
Date d'inscription
Statut
Membre
Dernière intervention
-
coccoweb Messages postés 141 Date d'inscription Statut Membre Dernière intervention -
coccoweb Messages postés 141 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Php hex to ascii
- Code ascii - Guide
- Hex workshop - Télécharger - Organisation
- Qwerty to azerty - Guide
- Hex editor neo - Télécharger - Édition & Programmation
- Hex edit - Télécharger - Édition & Programmation
2 réponses
Solution :
$return = preg_replace_callback ("/%([a-zA-Z0-9]{2})/", create_function ('$matches', 'return chr (hexdec ($matches[1]));'), $string);
$return = preg_replace_callback ("/%([a-zA-Z0-9]{2})/", create_function ('$matches', 'return chr (hexdec ($matches[1]));'), $string);
rawurldecode('fichier%20avec%20un%20ou%plusieurs%20espaces');
Voir aussi :
https://www.php.net/manual/fr/function.rawurlencode.php
https://www.php.net/manual/fr/function.rawurldecode.php