Manuel PHP

Exemples

Exemple #1 Exemple d'utilisation d'Enchant

  1. <?php
  2. $tag = 'en_US';  
  3. $r = enchant_broker_init();  
  4. $bprovides = enchant_broker_describe($r);  
  5. echo "Current broker provides the following backend(s):\n";  
  6. print_r($bprovides);  
  7.  
  8. $dicts = enchant_broker_list_dicts($r);  
  9. print_r($dicts);  
  10. if (enchant_broker_dict_exists($r,$tag)) { 
  11.    $d = enchant_broker_request_dict($r, $tag); 
  12.    $dprovides = enchant_dict_describe($d); 
  13.    echo "dictionary$tagprovides:\n"; 
  14.    $wordcorrect = enchant_dict_check($d, "soong"); 
  15.    print_r($dprovides); 
  16.    if (!$wordcorrect) { 
  17.       $suggs = enchant_dict_suggest($d, "soong"); 
  18.       echo "Suggestions for 'soong':"; 
  19.       print_r($suggs); 
  20.    } 
  21.    enchant_broker_free_dict($d);  
  22. } else {  
  23. }  
  24. enchant_broker_free($r);  
  25. ?> 

Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Bretagne - php - Moto - Kit graphique