Hallo!
Will folgendes realisieren:
Es gibt 2 Textboxen. In eine Textbox schreibt man seinen Text rein und in der anderen wird der Text instant angezeigt, aber es werden die normal Buchstaben durch breite Buchstaben ersetzt.
Das hab ich bis jetzt:
main.php
replace.php
Wenn ich das ganze ausführen will, kommt folgender Fehler:
Will folgendes realisieren:
Es gibt 2 Textboxen. In eine Textbox schreibt man seinen Text rein und in der anderen wird der Text instant angezeigt, aber es werden die normal Buchstaben durch breite Buchstaben ersetzt.
Das hab ich bis jetzt:
main.php
Code:
<?php
if ($_POST) {
$post = 'input' => $_POST['input'],;
$ch = curl_init('replace.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
}
?>
<form action="" method="POST">
<input type="text" name="input"/>
<input hidden value="<?php echo $_SERVER["SCRIPT_NAME"]; ?>" name="from"/>
<input type="submit" value="ok"/>
</form>
<?php if ($_POST) : ?>
<input type="text" name="output" value="<?php echo $response; ?>" />
<?php endif; ?>
Code:
<meta charset="utf-8" class="__web-inspector-hide-shortcut__">
<?php
$text = $_POST['input'];
$normal = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', '0', '1
', '2', '3', '4', '5', '6', '7', '8', '9', '!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', '-', '.', ',', '/', ':', ';', '<', '>', '@', '=', '?', '[', ']', '{', '}', '~', '|', '_');
$wide = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "\x20", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "#", "$", "%", "&", "'", "(", ")", "*", "+", "-", ".", ",", "/", ":", ";", "<", ">", "@", "=", "?", "[", "]", "{", "}", "~", "|", "_");
echo str_replace($normal, $wide, $text);
?>
Quote:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in F:\Programs\xampp\htdocs\main.php on line 3