Skip to main content

Materi Pertemuan Ke-2 (23 Sept 2017)

1. Review mengenai materi pertemuan pertama.
    apa itu algoritma? Apa itu flowchart? Contoh Algoritma dan Flowchart.

2. Pengenalan PHP environment setting through CPANEL.
    apa itu domain? Apa itu hosting? Sekilas mengenai CPANEL.

3. Contoh program PHP untuk menghitung luas Segitiga.


Mengenai PHP \:
https://www.w3schools.com/php/default.asp
https://www.w3schools.com/php/php_intro.asp
https://www.w3schools.com/php/php_install.asp
https://www.w3schools.com/php/php_syntax.asp
https://www.w3schools.com/php/php_variables.asp
https://www.w3schools.com/php/php_echo_print.asp
https://www.w3schools.com/php/php_datatypes.asp 

Catatan Pertemuan 23 Sept 2017:
Review materi pertemuan sebelumnya (pertama) : done.
Pengenalan CPANEL: pending (karena tidak ada komputer)
Contoh program PHP untuk menghitung luas segitiga: done

What is PHP?
PHP is an acronym for "PHP: Hypertext Preprocessor"
PHP is a widely-used, open source scripting language
PHP scripts are executed on the server
PHP is free to download and use

How to Use PHP:
Method 1. Use a Web Host With PHP Support
If your server has activated support for PHP you do not need to do anything.
Just create some .php files, place them in your web directory, and the server will automatically parse them for you.
You do not need to compile anything or install any extra tools.
Because PHP is free, most web hosts offer PHP support.

Method 2. Set Up PHP on Your Own PC
However, if your server does not support PHP, you must:
install a web server
install PHP
install a database, such as MySQL
recommend to install: WAMP or XAMP server in your personal Computer.

Basic PHP Syntax
A PHP script can be placed anywhere in the document.
A PHP script starts with <?php and ends with ?>:

<?php
// PHP code goes here
?>
The default file extension for PHP files is ".php".

Creating (Declaring) PHP Variables
In PHP, a variable starts with the $ sign, followed by the name of the variable:

Example
<?php
$txt = "Hello world!";
$x = 5;
$y = 10.5;
?>

The PHP echo Statement
The echo statement can be used with or without parentheses: echo or echo().

Display Text

The following example shows how to output text with the echo command (notice that the text can contain HTML markup):

Example
<?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
?>

Display Variables

The following example shows how to output text and variables with the echo statement:

Example
<?php
$txt1 = "Learn PHP";
$txt2 = "W3Schools.com";
$x = 5;
$y = 4;

echo "<h2>" . $txt1 . "</h2>";
echo "Study PHP at " . $txt2 . "<br>";
echo $x + $y;
?>





Comments

Popular posts from this blog

OSI LAYER: PENGERTIAN, FUNGSI DAN CARA KERJA 7 LAPISAN OSI

  Pengertian OSI Layer  – Ketika menggunakan  e-mail , pernahkah Anda berpikir tentang bagaimana isi  e-mail  tersebut dapat berpindah dari satu perangkat ke perangkat lain? Hanya dengan sekali klik, beberapa saat kemudian Anda dapat mengirim informasi kepada seseorang nun jauh di sana. Informasi tersebut sampai kepada penerima  e-mail  dalam bentuk yang sama. Dan tahukah Anda kalau sebenarnya hal tersebut membutuhkan proses cukup panjang?. Nah, kali ini Anda dapat mengetahui bagaimana itu terjadi dengan mempelajari cara kerja OSI Layer. Pengertian OSI Layer Setiap komputer dalam jaringan memiliki cara berkomunikasinya masing-masing. Komputer bermerek A memiliki bahasa sendiri, dan hanya bisa berkomunikasi dengan perangkat lain yang bermerek sama. Hal tersebut juga terjadi pada sistem jaringan. Di mana pertukaran informasi antar jaringan tidak bisa terjalin dengan baik. Sementara tentu saja proses komunikasi dibutuhkan tidak hanya oleh komputer dalam s...

Apa itu Landing Page? Ini Cara Kerja & Bedanya dengan Website

  Apakah kamu pernah dengan istilah dan pengertian Landing Page? Apa itu Landing Page? Lantas apa bedanya dengan Website? Nah, Kita akan bahas lebih lengkap tentang pengertian landing Page, Fungsi, tips membuat dan Tools untuk   optimasi website   landing page kamu. Pengertian Landing Page Apa itu Landing Page? Landing Page adalah halaman yang dirancang khusus untuk mengarahkan user ke arah yang dinginkan secara spesifik, Misalnya : Laman khusus produk atau laman penawaran. Jadi bisa disimpulkan landing page adalah sebuah halaman khusus yang menjadi tujuan user dan berisi informasi lebih detail dan spesifik tentang produk, service, penawaran, dll. Sehingga bisa disimpulkan jika landing page merupakan laman yang dikhususkan untuk mindset marketing. Jenis – Jenis Landing Page Landing Page Click Through , Jenis landing page ini memiliki informasi penjelasan tentang detail produk atau suatu penawaran yang lebih spesifik kepada user dan pelanggan. Misalnya sebuah laman yang be...