Hocu da ubacim php brojac poseta u html stranicu ali kad to uradim na sajtu mi pokazuje sledecu informaciju
Ti si 0) { echo $c; $c++; settype ($c, "string"); $file = fopen ("brojac.txt", "w"); fwrite ($file, $c); fclose($file); } ?> posetioc ovog sajta!
u cemu je problem a scriptu sam preuzeo sa ovog foruma i ubacio sam je tako sto sam iskopirao ceo php kod u html stranicu na mestu gde zelim da se pojavi.Unapred hvala
Ti si
<?
$file=file("brojac.txt");
$c=@chop($file[0]);
settype ($c, "integer");
if ($c>0)
{
echo $c;
$c++;
settype ($c, "string");
$file = fopen ("brojac.txt", "w");
fwrite ($file, $c);
fclose($file);
}
?>
posetioc ovog sajta!
|