【发布时间】:2014-03-01 11:16:08
【问题描述】:
<?php
$dateiname = 'daten.txt';
$inhalt =$_POST['vorname'].' '.$_POST['nachname']."; ".$_POST['abteilung'].";".$_POST['strecke']."; ".$_POST['groesse'].' ; '.$_POST['tag'].'.'.$_POST['monat'].'.'.$_POST['jahr'].PHP_EOL."";
echo "Sie haben folgende Angaben gemacht:<br>";
echo "Name: $_POST[vorname] $_POST[nachname]
<br>Abteilung: $_POST[abteilung]
<br>Geburtsdatum: $_POST[tag].$_POST[monat].$_POST[jahr]
<br>Strecke: $_POST[strecke]
<br>Groesse: $_POST[groesse]<br> ";
echo "Vielen Dank!";
$handle = @fopen($dateiname, "ab+");
fwrite($handle, $inhalt);
fclose ($handle);
if (file_exists($dateiname) == true) {
@chmod ($dateiname, 0757);
}
sleep(10);
header("location: http://google.com");
?>
我尝试做一个 php 回显,然后在 10 秒后重定向。但是使用此代码,php echo 不会显示。
【问题讨论】: