skip to main | skip to sidebar

tyka.bublee

Senin, 07 Desember 2009

contoh tampilan script


< ?ini scriptnya :

phpheader(" Content-Type:image/jpeg" );$background=@imagecreate(100,100);$kuning=imagecolorallocate($background,250,250,300);$hitam=imagecolorallocate($background,0,0,0);imagearc($background,50,50,50,50,0,360,$hitam);imageJPEG($background);imagedestroy($background);? >

< ?phpheader(" Content-Type:image/jpeg" );$background=@imagecreate(100,100);$kuning=imagecolorallocate($background,250,250,300);$hitam=imagecolorallocate($background,0,0,0);imagearc($background,50,50,50,50,0,360,$hitam);imageJPEG($background);imagedestroy($background);? >


< ?php$a = 2;$b = 15;print " \$a = $a dan \$b = $b " ;if ($a > $b){print ;" Nilai a lebih besar dari nilai b;" ;}else{print ;" Nilai a lebih kecil dari nilai b;" ;}?>



< ?php$kalimat = " Belajar PHP" ;$jumlah=strlen($kalimat);print " variabel string \$kalimat = $kalimat <> " ;print " Kalimat '$kalimat' diatas jumlah karakternya adalah $jumlah " ;? >




< ?php$cfile = " datapengunjung.dat" ;$fh = fopen($cfile, " r+" );if (!$fh){die(" Gagal membuka file <> $cfile< /I> . " );}$s = fgets($fh, 6);$hitung = (int) $s;$hitung = $hitung + 1;$hitung = str_pad($hitung, 6);rewind($fh);fwrite($fh, $hitung);echo " Anda pengunjung ke $hitung" ;fclose($fh);? >





< ?php$dir = opendir(" ./ " );while ($baca_file = readdir($dir)){echo " $baca_file" , " \n" ;}closedir($dir);? >
Diposting oleh atika di 20.03

Tidak ada komentar:

Posting Komentar

Posting Lebih Baru Posting Lama Beranda
Langganan: Posting Komentar (Atom)

my counter =]

Hit Counter
Free Counter

Pengikut

Arsip Blog

  • ▼  2009 (7)
    • ▼  Desember (3)
      • script php
      • contoh tampilan script
      • Contoh Skrip PHP ( Chapter 1 )
    • ►  Agustus (4)

Mengenai Saya

Foto saya
atika
bukan seorang yang perfect.. love you god , love you my parents , love you all my friends and love you all !!!
Lihat profil lengkapku