24 Maret 2012

Langkah membuat file PHP


  1. Buka Notepad++/dreamweaver/script editor lainnya
  2. tag Pembuka php di mulai dengan <?php
  3. tag penutup di akhiri dengan ?>
  4. nama file di akhiri dengan .php
  5. contoh : file1.php 
<?php
tempat mengetik kode- kode
?>

      6.  Satu baris kode php di tutup dengan tanda titik koma ( ; )
      7.  Penempatan kode-kode php ada 2 cara
           1.di dalam file php
           2.di dalam file html


  •  Menjalankan Web Server :
Start =>program=>xampp for windows =>xampp control panel =>klik star pada baris apache
  • Direktori kerja : tempat menyimpan file-file html/php,gambar,video,dll
  • Membuat direktori kerja
  1. Buka C:\xampp\htdocs(dengan windows explorer)
  2. klik file =>klik new=>klik folder
  3. beri nama dengan format: latihan
  4. enter
Direktori kerja : C\xampp\htdocs(document root)
                         http//localhost/=>C:\xampp\htdocs
                         C:\xampp\latihan => http://localhost//latihan


Tidak ada komentar:

Posting Komentar