salve ciao,
pare che il solito redirect in Php5 non funzioni
vediamo i particolari...
- Primo esempio. con php4 Ok - in Php5 NO!
Codice PHP:
<?php
print(" <p align=\"center\"> User Not Found</p>
"); // err msg
header('Refresh: 3; url=index.html'); // waits 3 seconds & sends to homepage
?>
- Secondo esempio. con php4 Ok - in Php5 NO!
Codice PHP:
<?php
/* Redirect to a different page in the current directory that was requested */
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'mypage.php';
header("Location: [url]http://[/url]$host$uri/$extra");
exit;
?>
- Terzo esempio. con php4 Ok - in Php5 NO!
Codice PHP:
<?php
header("Location: [url]http://www.example.com/[/url]");
exit;
?>
e questo è L' Errore che appare in corrispondenza della riga che fa riferimento al comando:
header(ecc....
-------------- errore
Warning: Cannot modify header information - headers already sent by (output started at /home/affil/public_html/contratto.php:7) in /home/affil/public_html/contratto.php on line 72
------------ end errore
e così via anche con altri...
quindi pare che il Php5 sembra non digerire l' header
C'è rimedio a questa cosa?
Grazie