Login to Website

Login dengan Facebook

 

Post Reply
Thread Tools
  #1  
Old 11th November 2011
Braincode's Avatar
Braincode
Ceriwis Addicted
 
Join Date: Nov 2011
Posts: 4,638
Rep Power: 20
Braincode mempunyai hidup yang Normal
Default [ASK] code php

klo kode ini di mana yh agan semua letak kesalahan nya, ato ada yg kurang langsung di kasi tau ja agan semua



function hitcounter_widget($args) {

$filename= "counter.txt" ;



if (file_exists($filename)) {

$fd = fopen ($filename , "r") or die ("Gak bisa baca $filename");

$fstring = fread ($fd , filesize ($filename));

fclose($fd);

} else {

$fstring = '1';

}



if ($_SESSION[hitCounter]=='') {

$fd = fopen ($filename , "w") or die ("Gak bisa nambah $filename") ;

$fstring++ ;

$fout= fwrite ($fd , $fstring ) ;

fclose($fd) ;

$_SESSION[hitCounter]='ON';

}



extract($args);



echo $before_widget;

echo $before_title;

echo "Pengunjung";

echo $after_title;

echo "$fstring
Sejak Juni 2009";

echo $after_widget;

}



function init_hitcounter(){

register_sidebar_widget(__('Hit Counter'), 'hitcounter_widget');

}



add_action("plugins_loaded", "init_hitcounter");



?>




soal nya waktu di jalan kan ter jadi hal seperti ini



warning online 18 parameter leght must be greater then 0



Sponsored Links
Space available
Post Reply

Thread Tools



Switch to Mobile Mode

no new posts