#1. PHP - 1
#1. PHP - 1
Why PHP ??
Simple and familiar
Architecture neutral (platform independent)
Open Source
High rank in TIOBE Index
De-Facto standard programming language in education
Perangkat yang dibutuhkan
1. Web Server :
Apache=>PHP,
TOMCAT => JSP,
IIS => .NET
1. Code Editor:
1. Text Editor:
TextPad, Notepad++, SUBLIME, CORE
2. Integrated Development Environment (IDE):
Netbeans, Front page, Dreamweaver
Konsep Multi Tier Application
Multi tier application adalah aplikasi yang dibagi menjadi beberapa bagian yang menjalankan
fungsi masing-masing.
$g = double(++$e);
/* assign twice the value of $e after the increment, 2*7 = 14 to $g */
$h = $g += 10;
/* first, $g is incremented by 10 and ends with the value of 24. the value of the assignment (24) is then assigned into $h, and $h ends with
the value of 24 as well. */
?>
Comment
Komentar di PHP
// komentar
Komentar untuk 1 baris.
/* komentar
komentar
*/
Komentar yang memakan banyak baris.
Contoh :
<html>
<body>
<?php
Echo(“4 + 5 = ” . 4+5); // menampilkan hasil 4 + 5
//This is a comment
/* This is
a comment
block */
?>
</body>
</html>
Latihan 2
<html>
<head>
<title>tugasi 1 </title>
<body>
<?php
echo "<br>";
echo “teks ini muncul dari dalam kode PHP";
// ini contoh baris komentar
/* ini contoh beberapa
baris komentar */
echo “<hr>”;
?>
<br>
</body
</html>
Latihan Tiga
buat program php yang menampilkan output sebagai berikut :
Hallo semua...
saya sedang belajar php..
ternyata mudah lho..