Rapide Advanced Adulte
 
 Web|Image|Shop|Video|News|Wmx|Mobile|Wiki|Ajouter ce moteur

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.mb check encoding
.mb convert case
.mb convert encoding
.mb convert kana
.mb convert variables
.mb decode mimeheader
.mb decode numericentity
.mb detect encoding
.mb detect order
.mb encode mimeheader
.mb encode numericentity
.mb ereg match
.mb ereg replace
.mb ereg search getpos
.mb ereg search getregs
.mb ereg search init
.mb ereg search pos
.mb ereg search regs
.mb ereg search setpos
.mb ereg search
.mb ereg
.mb eregi replace
.mb eregi
.mb get info
.mb http input
.mb http output
.mb internal encoding
.mb language
.mb list encodings alias names
.mb list encodings
.mb list mime names
.mb output handler
.mb parse str
.mb preferred mime name
.mb regex encoding
.mb regex set options
.mb send mail
.mb split
.mb strcut
.mb strimwidth
.mb stripos
.mb stristr
.mb strlen
.mb strpos
.mb strrchr
.mb strrichr
.mb strripos
.mb strrpos
.mb strstr
.mb strtolower
.mb strtoupper
.mb strwidth
.mb substitute character
.mb substr count
.mb substr
 
   

  mb_detect_order  


mb_detect_order

(PHP 4 >= 4.0.6, PHP 5)

mb_detect_order --  Lit/modifie l'ordre de détection des encodages

Description

mixed mb_detect_order ( [mixed encoding_list] )

mb_detect_order() remplace l'ordre de détection des encodages courant par encoding_list. mb_detect_order() retourne TRUE en cas de succès, et FALSE en cas d'erreur.

encoding_list est un tableau, ou une liste d'encodages séparés par une virgule. La valeur "auto" est automatiquement remplacée par "ASCII, JIS, UTF-8, EUC-JP, SJIS".

Si encoding_list est omis, mb_detect_order() retourne l'ordre de détection courant des encodages.

Ce paramétrage affecte les fonctions mb_detect_encoding() et mb_send_mail().

Note : Actuellement, mbstring supporte les filtres de détections ci-dessous. Si une séquence d'octets est invalide pour l'un des filtres suivants, la détection échouera.

Note : UTF-8, UTF-7, ASCII, EUC-JP, SJIS, eucJP-win, SJIS-win, JIS et ISO-2022-JP

Pour ISO-8859-*, mbstring détecte toujours ISO-8859-*.

Pour UTF-16, UTF-32, UCS2 et UCS4 la détection échouera toujours.

Exemple 1. Exemple d'ordre de détection inutile

; Always detect as ISO-8859-1
detect_order = ISO-8859-1, UTF-8

; Always detect as UTF-8, since ASCII/UTF-7 values are 
; valid for UTF-8
detect_order = UTF-8, ASCII, UTF-7

Exemple 2. Exemple avec mb_detect_order()

<?php
/* Remplace l'ordre de détection par une liste énumérée */
mb_detect_order("eucjp-win,sjis-win,UTF-8");

/* Remplace l'ordre de détection par un tableau */
$ary[] = "ASCII";
$ary[] = "JIS";
$ary[] = "EUC-JP";
mb_detect_order($ary);

/* Affiche l'ordre de détection courant */
echo implode(", ", mb_detect_order());
?>

Voir aussi mb_internal_encoding(), mb_http_input(), mb_http_output() et mb_send_mail()


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur
.