halihalo,
danke! genauso hab ich mir das vorgestellt.
Das ist sicherlich nicht ungefährlich...
und was ist mit get_magic_quotes_gpc() ?
die sind auf dem server aus, und im script kann ich sie nicht verwenden,
denn das würde stören (soll sone art online editor sein).
der doctype indem das script eingebunden ist, ist XHTML 1.0 Strict.
der w3c validator spuckt noch einige fehler aus, ich hoffe die lassen
sich beheben.
<?php
$datei = "textarea.php";
$dbdatei = "textarea.db";
$textfh = "400";
$textfb = "140";
$content = "";
if(isset($_POST['senden']))
{
$fp = fopen("$dbdatei","w");
if($fp)
{
flock($fp, LOCK_EX);
fwrite($fp, $_POST['text']);
fclose($fp);
}
}
$fp = fopen($dbdatei, "r");
if ($fp)
{
flock($fp, LOCK_SH);
$content = fread($fp, filesize($dbdatei)+1);
fclose($fp);
}
echo "<form action=\"{$_SERVER['SCRIPT_NAME']}\" method=\"post\">\r\n".
"<input type=\"submit\" name=\"senden\" value=\"Speichern\"> ". ## Line 27
"<input type=\"submit\" name=\"neuladen\" value=\"Neu laden\">\r\n<br /><br />". ## Line 28
"<textarea name=\"text\" cols=\"$textfb\" rows=\"$textfh\">".
htmlspecialchars($content)."</textarea>\r\n".
"</form>\r\n";
?>
Line 27, Column 52: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
Line 27, Column 53: end tag for "input" omitted, but OMITTAG NO was specified.
Line 27, Column 59: character data is not allowed here.
Line 27, Column 113: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
Line 27, Column 114: end tag for "input" omitted, but OMITTAG NO was specified.
Line 28, Column 5: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
Line 28, Column 11: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
Line 28, Column 55: document type does not allow element "textarea" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
lässt sich da was machen oder liegt es an meinem server?
cucu
zoidby