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;
?>
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
Post a Comment