Buongiorno.
Il seguente codice php non funziona come dovrebbe.
Visualizzo due richiami a due link ma il primo non appare correttamente.
Il codice php e' il seguente:
codice:
<?
echo "
<html>
<head>
<meta http-equiv=Content-Type content=\"text/html; charset=windows-1252\">
<meta content=\"prova\" name=Author>
<meta http-equiv=pragma content=no-cache>
<meta content=index,follow name=robots>
<meta content=\"Home Page\" name=description>
<meta content=\"MSHTML 5.50.4611.1300\" name=GENERATOR>
</head>
<tr>
<td align=center>
<a href = \"http://93.62.155.214/~omirl/WEB/areali/radar_rpa.gif\"
target = \"_new\"
rel = \"nofollow\"
title = \"Radar ARPAL\">
<img border = \"1\"
style = \"border-color: white\"
src = \"http://93.62.155.214/~omirl/WEB/areali/radar_rpa.gif\"
width = \"250\"
height = \"*\"
vAlign = \"middle\"></a>
<a href = \"http://sc05.arpa.piemonte.it/previ/last_movie_compa.gif\"
target = \"_new\"
rel = \"nofollow\"
title = \"Radar Arpa\">
<img border = \"1\"
style = \"border-color: white\"
src = \"http://sc05.arpa.piemonte.it/previ/last_movie_compa.gif\"
width = \"250\"
height = \"*\"
vAlign = \"middle\"></a>
</td>
</tr>
</html>
";
?>
Se invece carico la stessa pagina ma in formato HTML, funziona tutto bene:
codice:
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta content="prova" name=Author>
<meta http-equiv=pragma content=no-cache>
<meta content=index,follow name=robots>
<meta content="Home Page" name=description>
<meta content="MSHTML 5.50.4611.1300" name=GENERATOR>
</head>
<tr>
<td align=center>
<a href = "http://93.62.155.214/~omirl/WEB/areali/radar_rpa.gif"
target = "_new"
rel = "nofollow"
title = "Radar ARPAL">
<img border = "1"
style = "border-color: white"
src = "http://93.62.155.214/~omirl/WEB/areali/radar_rpa.gif"
width = "250"
height = "*"
vAlign = "middle"></a>
<a href = "http://sc05.arpa.piemonte.it/previ/last_movie_compa.gif"
target = "_new"
rel = "nofollow"
title = "Radar Arpa">
<img border = "1"
style = "border-color: white"
src = "http://sc05.arpa.piemonte.it/previ/last_movie_compa.gif"
width = "250"
height = "*"
vAlign = "middle"></a>
</td>
</tr>
</html>
Perche'?
Nel codice PHP ho anche provato ad utilizzare l'istruzione URLENCODE() piuttosto che indicare chiaramente l'indirizzo link, ma senza alcun risultato.
E' forse quel carattere ~ (tilde) che puo' provocare l'errore od il rimando alla radice del server oppure questo e' un argomento di Apache?
Utilizzo PHP ver. 5.2.17 ed Apache 2.2.22.
Il problema si evidenzia sia in localhost che sul server di Altervista.
Grazie