| 
	
 | 
 Posted by Simon on 12/21/07 19:15 
Hi, 
I put a webpage on two different servers. On one of them it works 
fine: 
www.fargo.pozman.pl/farmmonitor/index.php 
But when I put it on          www.ageng.ndsu.nodak.edu/farmmonitor/index.php 
then the links on the left side doesn't work. Does anyone has any idea 
what could be a reason. 
It seems that there is a problem with passing variables, but on one 
server it works fine, so is it something with sever configuration? 
 
Thanks for any help. 
 
Here is the code of index.php: 
 
 
<?php setcookie("gosc", "1", time()+3600); ?> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head> 
 
<meta http-equiv="content-type" content="text/html; 
charset=iso-8859-2"> 
<title>Farm Monitor</title> 
<link rel="stylesheet" type="text/css" href="./styl.css"> 
</head> 
<body style="background: url(menu.gif)"; topmargin="0px"; 
leftmargin="0px"; rightmargin="0px"; link="black"; vlink="black"; 
alink="black"> 
 
<table width="100%" border=0 style="background: url(back_top.gif) 
repeat-x; border: solid #ECECEC 0px; border-bottom: 0px;" 
cellpadding=0 cellspacing=0> 
<tr> 
<td> 
<table align=center width=770 cellpadding=0 cellspacing=0 
style="border-left: 0px dotted #AFAFAF; border-right: 0px dotted 
#AFAFAF; border-bottom: 0px;" valign=middle> 
<tr><td> 
<map name="katedra"> 
 <area shape="rect" coords="17,24,755,60" href="./index.php"> 
</map> 
<img border=0 src="baner1.gif" usemap="#katedra" align="center"> 
</td> 
</tr> 
</table> 
</td> 
</tr> 
<tr><td> 
<table width=774px align=center border="1px" border frame=void 
rules=none style="border-left: 2px dotted #AFAFAF; border-right: 2px 
dotted #AFAFAF; border-bottom: 2px dotted #AFAFAF;" cellpadding=0 
cellspacing=0; border-top: 0px> 
<tr><td valign=top bgcolor="#8278FF"> 
 
<div id="flMenu" style="position:relative;width:150px;top:0px;left: 
0px"> 
<table width="150px" border="0" rules=none style="topmargin="0px"; 
leftmargin="0px";" cellpadding=0 cellspacing=3> 
<tr><td align=center><H1><A class=moja href="index.php? 
f=1">Temperature</A></td></tr> 
<tr><td align=center><H1><A class=moja href="index.php?f=2">Rainfall</ 
A></td></tr> 
<tr><td align=center><H1><A class=moja href="index.php?f=3">Water 
Level</A></td></tr> 
<tr><td align=center><H1><A class=moja href="index.php?f=4">Water 
Content</A></td></tr> 
<!-- <tr><td align=center><H1><A class=moja href="index.php? 
f=5">Links</A></td></tr> --> 
 
</td></tr> 
</table> 
</div> 
 
</td> 
<td valign=top><H1 class=tlo> 
<table width=620px cellpadding=0 cellspacing=0 bgcolor=white><tr><td 
valign=top> 
<table width=620px cellpadding=0 cellspacing=0 style="text-align: 
center;"><tr><td height=300 valign=top> 
<?php 
if ($f==0){ 
include("kg.php");} 
elseif ($f==1){require("1.php"); 
 
echo '<table><tr><td>'; 
include("ctemperature.php"); 
echo '</td><td>'; 
 
include("mytemperature.php"); 
echo '</td></tr></table>'; 
echo '<hr>'; 
include("myline1.php"); 
include("ctempstat.php"); 
echo '<br>'; 
echo '<hr>'; 
include("myline1week.php"); 
include("ctempstatweek.php"); 
 
} 
elseif ($f==2){require("2.php"); 
echo '<br><br>'; 
include("ccounter.php"); 
include("myline3week.php"); 
} 
elseif ($f==3){require("3.php"); 
include("ciswater.php"); 
include("myline2.php"); 
} 
elseif ($f==4){require("4.php"); 
include("cwatercontent.php"); 
include("myline4.php"); 
include("cwatercontentstat.php"); 
} 
elseif ($f==5){require("5.php"); 
} 
 
?> 
 
</H1 class=tlo> 
</td></tr></table> 
</td></tr></table> 
</td></tr> 
</td></tr> 
<tr><td colspan=2 valign="middle" nowrap><table width=100%; 
align=center; border=0px; cellpadding=0; cellspacing=0; 
bgcolor="#8278FF"><tr><td nowrap width= 150><H1 class=stopa> 
 
</H1 class=stopa></td><td valign="middle" align=center nowrap><H1 
class=stopa>FARM MONITOR:::2007:::Szymon Woznica:::North Dakota State 
University 
 
 <?     echo ' ['; 
if($gosc!="1"){ 
$file=fopen("licznik.txt", "r"); //otwieranie pliku licznika do 
odczytu 
flock($file, 1); //blokowanie do odczytu 
$cyfra=fgets($file, 100);//pobieramy z pliku cyfrę 
flock($file, 3); //odblokowanie po odczycie 
fclose($file); 
$cyfra++; //dodanie punktu do licznika 
 
$file=fopen("licznik.txt", "w");//otwieranie pliku licznika do 
zamazania 
flock($file, 2); //blokowanie do zapisu 
fwrite($file, $cyfra); //zapis stanu licznika 
flock($file, 3); //odblokowanie po zapisie 
fclose($file); 
echo ("$cyfra");//wyświetlenie cyfry na stronie 
} 
// jeśli użytkownik był już przed chwilą na stronie wykona się 
instrukcja poniżej 
else { 
$file=fopen("licznik.txt", "r"); //otwieranie pliku licznika do 
odczytu 
flock($file, 1); //blokowanie do odczytu 
$cyfra=fgets($file, 100);//pobieramy z pliku cyfrę 
flock($file, 3);//odblokowanie po odczycie 
fclose($file);//zamykamy plik 
echo ("$cyfra");//wyświetlenie cyfry na stronie 
} ?> visits] 
 
</H1 class=stopa></td></tr></table> 
</td></tr></table> 
 
</body> 
</html>
 
[Back to original message] 
 |