Toon posts:

Beginnersvraag: Hoe na output doorverwijzen?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Heb al gezocht in de database van GOT maar kon niet echt iets goeds vinden.

Heb dit scriptje:

<?PHP


$uitvoerbestand="index.html";
$bestandsindex = fopen($uitvoerbestand, "a");

fwrite($bestandsindex, "<BR><br> *** <br> $cl");
fclose($bestandsindex)


header("Location: index.html");
exit;


?>


hij voert het goed uit maar blijft stil staan op een wit scherm. als je terug gaat en refresht dan staat het er. Dit werkt dus. Maar het doorverwijzen lukt niet. (header("Location blabla) Hoe komt dat? Dit zou toch moeten werken?:?
bedankt!
GRTZ OSTARIUS

edit:

sorry dat ik geen duidelijke titel had, mijn excuses

  • sebas
  • Registratie: April 2000
  • Laatst online: 16-12-2025
Heb je dit gecheckt?
Remember that the header() function must be called before any actual output is sent, either by normal HTML tags blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that will output before header() is called. The same problem exists when using a single PHP/HTML file.
http://www.php.net/manual/en/function.header.php

Lees vooral het gedeelte met de witregels ff goed door en check het in je script.

HTH.

Everyone complains of his memory, no one of his judgement.


  • Willem2
  • Registratie: Oktober 2000
  • Laatst online: 10-09 07:49

Willem2

Ω is futile

zou goed moeten gaan volgens mij; ik zie geen output...

heb je het al met een volledige url geprobeerd? dus: http://bladiebla/index.html?

trouwens, wat is die $cl?

en nee, ik houd niet van voetbal... :)


  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Na output moet je doen door een metatag:
code:
1
<meta http-equiv="refresh" content="x;url">

waar x het aantal seconden is en url, je raadt het al, de url

edit: oopzie, value=... moest content=... zijn *D

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz