mirror of
https://github.com/php/web-php.git
synced 2026-03-31 19:52:29 +02:00
20 lines
612 B
Plaintext
20 lines
612 B
Plaintext
<? require 'header2.inc' ?>
|
|
<h2>Simple Spell-Checker</h2>
|
|
<font size=+>
|
|
<? $aspell_link=aspell_new( "english");
|
|
$word = substr($PATH_INFO,1); /* strip away first / */
|
|
if (aspell_check($aspell_link,$word)) {
|
|
echo "Correct spelling of '$word'<P>\n";
|
|
} else {
|
|
echo "Incorrect spelling of '$word'<P>\n";
|
|
}
|
|
echo "Possible correct spellings include:<br>\n";
|
|
$suggestions=aspell_suggest($aspell_link,$word);
|
|
for($i=0; $i < count($suggestions); $i++) {
|
|
echo "<li>" . $suggestions[$i] . "<br>";
|
|
}
|
|
echo "</ol>";
|
|
?>
|
|
</font>
|
|
<?require 'footer.inc'?>
|